Package org.gridgain.ml.compute
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecuteAsync(JobExecutionContext context, I arg) Executes the job on an Ignite node.@Nullable Marshaller<I,byte[]> Marshaller for the input argument.abstract CompletableFuture<O>predictAsync(JobExecutionContext context, I arg) protected voidupdateModelPathFromDeploymentUnits(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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.ignite.compute.ComputeJob
resultMarshaller
-
Constructor Details
-
MlComputeJob
public MlComputeJob()
-
-
Method Details
-
inputMarshaller
Description copied from interface:ComputeJobMarshaller for the input argument. Default isnullmeaning that only primitive types are supported.- Specified by:
inputMarshallerin interfaceComputeJob<I extends MlJobParameters,O> - Returns:
- Input marshaller.
-
predictAsync
-
executeAsync
Description copied from interface:ComputeJobExecutes the job on an Ignite node.- Specified by:
executeAsyncin interfaceComputeJob<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.
-