Class ModelStorageProviderImpl.FileModelSource

java.lang.Object
org.gridgain.internal.ml.storage.ModelStorageProviderImpl.FileModelSource
All Implemented Interfaces:
ModelSource
Enclosing class:
ModelStorageProviderImpl

public static class ModelStorageProviderImpl.FileModelSource extends Object implements ModelSource
Implementation of ModelSource for file-based model storage. This handles models stored on the local file system.
  • Method Details

    • getUri

      public String getUri()
      Gets the URI for this model source.
      Specified by:
      getUri in interface ModelSource
      Returns:
      The URI as a string
    • getModelId

      public String getModelId()
      Gets the model ID associated with this source.
      Specified by:
      getModelId in interface ModelSource
      Returns:
      The model ID
    • getVersion

      public String getVersion()
      Gets the version associated with this source.
      Specified by:
      getVersion in interface ModelSource
      Returns:
      The version
    • resolveToLocalPath

      public CompletableFuture<Path> resolveToLocalPath()
      Resolves this model source to a local path asynchronously. If the source is already local, returns the path. If the source is remote, downloads the model to a local path and returns that path.
      Specified by:
      resolveToLocalPath in interface ModelSource
      Returns:
      A CompletableFuture containing the path to the model on the local filesystem
    • isLocal

      public boolean isLocal()
      Checks if this model source is already available locally.
      Specified by:
      isLocal in interface ModelSource
      Returns:
      true if the model is available locally, false otherwise
    • getStatus

      public ModelSource.ModelSourceStatus getStatus()
      Gets the current status of this model source.
      Specified by:
      getStatus in interface ModelSource
      Returns:
      The model source status
    • setStatus

      public void setStatus(ModelSource.ModelSourceStatus status)
      Sets the status of this model source.
      Specified by:
      setStatus in interface ModelSource
      Parameters:
      status - The new status