Package org.gridgain.internal.ml.storage
Class ModelStorageProviderImpl.FileModelSource
java.lang.Object
org.gridgain.internal.ml.storage.ModelStorageProviderImpl.FileModelSource
- All Implemented Interfaces:
ModelSource
- Enclosing class:
- ModelStorageProviderImpl
Implementation of ModelSource for file-based model storage.
This handles models stored on the local file system.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gridgain.internal.ml.storage.ModelSource
ModelSource.ModelSourceStatus -
Method Summary
Modifier and TypeMethodDescriptionGets the model ID associated with this source.Gets the current status of this model source.getUri()Gets the URI for this model source.Gets the version associated with this source.booleanisLocal()Checks if this model source is already available locally.Resolves this model source to a local path asynchronously.voidSets the status of this model source.
-
Method Details
-
getUri
Gets the URI for this model source.- Specified by:
getUriin interfaceModelSource- Returns:
- The URI as a string
-
getModelId
Gets the model ID associated with this source.- Specified by:
getModelIdin interfaceModelSource- Returns:
- The model ID
-
getVersion
Gets the version associated with this source.- Specified by:
getVersionin interfaceModelSource- Returns:
- The version
-
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:
resolveToLocalPathin interfaceModelSource- 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:
isLocalin interfaceModelSource- Returns:
- true if the model is available locally, false otherwise
-
getStatus
Gets the current status of this model source.- Specified by:
getStatusin interfaceModelSource- Returns:
- The model source status
-
setStatus
Sets the status of this model source.- Specified by:
setStatusin interfaceModelSource- Parameters:
status- The new status
-