Package org.gridgain.internal.ml
Class IgniteMlImpl
java.lang.Object
org.gridgain.internal.ml.IgniteMlImpl
- All Implemented Interfaces:
org.gridgain.ml.IgniteMl
Implementation of
IgniteMl that provides ML inference capabilities for GridGain using direct execution. This implementation
handles:
- Model handler creation and management - Prediction caching - Direct model execution - SQL query processing - Async operations with true non-blocking behavior
Note: This implementation focuses on direct execution. Distributed compute
execution is handled externally via JobExecutor with JobExecutorType.JAVA_EMBEDDED type. All instances are guaranteed to support
async operations.
-
Constructor Summary
ConstructorsConstructorDescriptionIgniteMlImpl(org.apache.ignite.compute.IgniteCompute compute, org.apache.ignite.sql.IgniteSql sql, Supplier<Collection<org.apache.ignite.network.ClusterNode>> clusterNodesSupplier, Supplier<Executor> executorSupplier) Package-private constructor for testing with mocks. -
Method Summary
Modifier and TypeMethodDescription<I,O> List<O> batchPredict(org.gridgain.ml.model.MlBatchJobParameters<I> jobParams) <I,O> CompletableFuture<List<O>> batchPredictAsync(org.gridgain.ml.model.MlBatchJobParameters<I> jobParams) executor()Returns the executor for ML inference operations.<I,O> O predict(org.gridgain.ml.model.MlSimpleJobParameters<I> jobParams) <I,O> CompletableFuture<O> predictAsync(org.gridgain.ml.model.MlSimpleJobParameters<I> jobParams) <I,O> O predictColocated(org.gridgain.ml.model.MlColocatedJobParameters<I> jobParams) <I,O> CompletableFuture<O> predictColocatedAsync(org.gridgain.ml.model.MlColocatedJobParameters<I> jobParams) <O> List<O>predictFromSql(org.gridgain.ml.model.MlSqlJobParameters jobParams) <O> CompletableFuture<List<O>>predictFromSqlAsync(org.gridgain.ml.model.MlSqlJobParameters jobParams)
-
Constructor Details
-
IgniteMlImpl
public IgniteMlImpl(org.apache.ignite.compute.IgniteCompute compute, org.apache.ignite.sql.IgniteSql sql, Supplier<Collection<org.apache.ignite.network.ClusterNode>> clusterNodesSupplier, Supplier<Executor> executorSupplier) Package-private constructor for testing with mocks.- Parameters:
sql- TheIgniteSqlinterface for sql executioncompute- TheIgniteComputeinterface for job executionclusterNodesSupplier- Supplier providing availableClusterNodes
-
-
Method Details
-
predict
public <I,O> O predict(org.gridgain.ml.model.MlSimpleJobParameters<I> jobParams) - Specified by:
predictin interfaceorg.gridgain.ml.IgniteMl
-
predictAsync
public <I,O> CompletableFuture<O> predictAsync(org.gridgain.ml.model.MlSimpleJobParameters<I> jobParams) - Specified by:
predictAsyncin interfaceorg.gridgain.ml.IgniteMl
-
batchPredict
- Specified by:
batchPredictin interfaceorg.gridgain.ml.IgniteMl
-
batchPredictAsync
public <I,O> CompletableFuture<List<O>> batchPredictAsync(org.gridgain.ml.model.MlBatchJobParameters<I> jobParams) - Specified by:
batchPredictAsyncin interfaceorg.gridgain.ml.IgniteMl
-
predictFromSql
- Specified by:
predictFromSqlin interfaceorg.gridgain.ml.IgniteMl
-
predictFromSqlAsync
public <O> CompletableFuture<List<O>> predictFromSqlAsync(org.gridgain.ml.model.MlSqlJobParameters jobParams) - Specified by:
predictFromSqlAsyncin interfaceorg.gridgain.ml.IgniteMl
-
predictColocated
public <I,O> O predictColocated(org.gridgain.ml.model.MlColocatedJobParameters<I> jobParams) - Specified by:
predictColocatedin interfaceorg.gridgain.ml.IgniteMl
-
predictColocatedAsync
public <I,O> CompletableFuture<O> predictColocatedAsync(org.gridgain.ml.model.MlColocatedJobParameters<I> jobParams) - Specified by:
predictColocatedAsyncin interfaceorg.gridgain.ml.IgniteMl
-
executor
Returns the executor for ML inference operations. Internal API - not exposed on public IgniteMl interface.
-