Package org.gridgain.ml.model
Class ModelInfo
java.lang.Object
org.gridgain.ml.model.ModelInfo
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
MlJobParameters
Class representing metadata and configuration information about a machine learning model.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class for creating ModelInfo instances.static enumEnum representing the possible statuses of a model. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedModelInfo(ModelInfo.Builder builder) Creates a new ModelInfo object with builder pattern. -
Method Summary
Modifier and TypeMethodDescriptionconfig()Gets the model configuration.id()Gets the model ID.Gets the input class name.booleanisLoaded()Checks if the model is loaded.longGets the load timestamp.name()Gets the model name.Gets the output class name.Gets the model properties.Gets a property value.Gets a property value with a default.voidsetInputClass(String inputClass) Sets the input class name.voidsetLoaded(boolean loaded) Sets the loaded status.voidsetOutputClass(String outputClass) Sets the output class name.voidsetProperty(String key, String value) Sets a property value.voidsetStatus(ModelInfo.ModelStatus status) Sets the model status.voidsetTranslator(String translator) Sets the translator class name.voidsetTranslatorFactory(String translatorFactory) Sets the translator factory class name.voidSets the model URL.voidsetVersion(String version) Sets the model version.status()Gets the model status.Gets the translator class name.Gets the translator factory class name.type()Gets the model type.url()Gets the model URL.version()Gets the model version.
-
Constructor Details
-
ModelInfo
Creates a new ModelInfo object with builder pattern.- Parameters:
builder- Builder instance
-
-
Method Details
-
id
Gets the model ID.- Returns:
- Model ID
-
name
Gets the model name.- Returns:
- Model name
-
version
Gets the model version.- Returns:
- Model version
-
type
Gets the model type.- Returns:
- Model type
-
url
Gets the model URL.- Returns:
- Model URL
-
config
Gets the model configuration.- Returns:
- Model configuration
-
properties
Gets the model properties.- Returns:
- Model properties
-
isLoaded
public boolean isLoaded()Checks if the model is loaded.- Returns:
- True if loaded
-
loadTimestamp
public long loadTimestamp()Gets the load timestamp.- Returns:
- Load timestamp
-
status
Gets the model status.- Returns:
- Model status
-
inputClass
Gets the input class name.- Returns:
- Input class name, or null if not set
-
outputClass
Gets the output class name.- Returns:
- Output class name, or null if not set
-
translator
Gets the translator class name.- Returns:
- Translator class name, or null if not set
-
translatorFactory
Gets the translator factory class name.- Returns:
- Translator factory class name, or null if not set
-
setLoaded
public void setLoaded(boolean loaded) Sets the loaded status.- Parameters:
loaded- Whether the model is loaded
-
setVersion
Sets the model version.- Parameters:
version- Model version
-
setStatus
Sets the model status.- Parameters:
status- Model status
-
setUrl
Sets the model URL.- Parameters:
url- Model URL
-
setInputClass
Sets the input class name.- Parameters:
inputClass- Input class name
-
setOutputClass
Sets the output class name.- Parameters:
outputClass- Output class name
-
setTranslator
Sets the translator class name.- Parameters:
translator- Translator class name
-
setTranslatorFactory
Sets the translator factory class name.- Parameters:
translatorFactory- Translator factory class name
-
property
Gets a property value.- Parameters:
key- The property key- Returns:
- The property value, or null if not found
-
property
Gets a property value with a default.- Parameters:
key- The property keydefaultValue- The default value if property is not found- Returns:
- The property value, or the default if not found
-
setProperty
Sets a property value.- Parameters:
key- The property keyvalue- The property value
-