Class MlComputeJob<I extends MlJobParameters,O>

java.lang.Object
org.gridgain.ml.compute.MlComputeJob<I,O>
All Implemented Interfaces:
ComputeJob<I,O>

public abstract class MlComputeJob<I extends MlJobParameters,O> extends Object implements ComputeJob<I,O>
Base Compute job for all ML predictions.
  • Constructor Details

    • MlComputeJob

      public MlComputeJob()
  • Method Details

    • inputMarshaller

      @Nullable public @Nullable Marshaller<I,byte[]> inputMarshaller()
      Description copied from interface: ComputeJob
      Marshaller for the input argument. Default is null meaning that only primitive types are supported.
      Specified by:
      inputMarshaller in interface ComputeJob<I extends MlJobParameters,O>
      Returns:
      Input marshaller.
    • predictAsync

      public abstract CompletableFuture<O> predictAsync(JobExecutionContext context, @Nullable I arg)
    • executeAsync

      public CompletableFuture<O> executeAsync(JobExecutionContext context, @Nullable I arg)
      Description copied from interface: ComputeJob
      Executes the job on an Ignite node.
      Specified by:
      executeAsync in interface ComputeJob<I extends MlJobParameters,O>
      Parameters:
      context - The execution context.
      arg - Job arguments.
      Returns:
      Job future. Can be null if the job is synchronous and does not return any result.
    • updateModelPathFromDeploymentUnits

      protected void updateModelPathFromDeploymentUnits(MlJobParameters jobParameters, Collection<DeploymentUnitInfo> deploymentUnitInfo)
      This method updates the model path from deployment units and sets the job’s custom class, input marshaller, and output marshaller for proper execution and serialization.