Class IgniteMlImpl

java.lang.Object
org.gridgain.internal.ml.IgniteMlImpl
All Implemented Interfaces:
org.gridgain.ml.IgniteMl

public class IgniteMlImpl extends Object implements 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 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 - The IgniteSql interface for sql execution
      compute - The IgniteCompute interface for job execution
      clusterNodesSupplier - Supplier providing available ClusterNodes
  • Method Details

    • predict

      public <I, O> O predict(org.gridgain.ml.model.MlSimpleJobParameters<I> jobParams)
      Specified by:
      predict in interface org.gridgain.ml.IgniteMl
    • predictAsync

      public <I, O> CompletableFuture<O> predictAsync(org.gridgain.ml.model.MlSimpleJobParameters<I> jobParams)
      Specified by:
      predictAsync in interface org.gridgain.ml.IgniteMl
    • batchPredict

      public <I, O> List<O> batchPredict(org.gridgain.ml.model.MlBatchJobParameters<I> jobParams)
      Specified by:
      batchPredict in interface org.gridgain.ml.IgniteMl
    • batchPredictAsync

      public <I, O> CompletableFuture<List<O>> batchPredictAsync(org.gridgain.ml.model.MlBatchJobParameters<I> jobParams)
      Specified by:
      batchPredictAsync in interface org.gridgain.ml.IgniteMl
    • predictFromSql

      public <O> List<O> predictFromSql(org.gridgain.ml.model.MlSqlJobParameters jobParams)
      Specified by:
      predictFromSql in interface org.gridgain.ml.IgniteMl
    • predictFromSqlAsync

      public <O> CompletableFuture<List<O>> predictFromSqlAsync(org.gridgain.ml.model.MlSqlJobParameters jobParams)
      Specified by:
      predictFromSqlAsync in interface org.gridgain.ml.IgniteMl
    • predictColocated

      public <I, O> O predictColocated(org.gridgain.ml.model.MlColocatedJobParameters<I> jobParams)
      Specified by:
      predictColocated in interface org.gridgain.ml.IgniteMl
    • predictColocatedAsync

      public <I, O> CompletableFuture<O> predictColocatedAsync(org.gridgain.ml.model.MlColocatedJobParameters<I> jobParams)
      Specified by:
      predictColocatedAsync in interface org.gridgain.ml.IgniteMl
    • executor

      public Executor executor()
      Returns the executor for ML inference operations. Internal API - not exposed on public IgniteMl interface.