Package org.gridgain.ml.model
Class ModelInfo.Builder
java.lang.Object
org.gridgain.ml.model.ModelInfo.Builder
- Direct Known Subclasses:
MlJobParameters.Builder
- Enclosing class:
- ModelInfo
Builder class for creating ModelInfo instances.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddProperty(String key, String value) Adds a property.build()Builds the ModelInfo instance.config(ModelConfig config) Sets the model configuration.Creates a new builder based on an existing ModelInfo.Sets the model ID.inputClass(String inputClass) Sets the input class name.loaded(boolean loaded) Sets the loaded status.loadTimestamp(long loadTimestamp) Sets the load timestamp.Sets the model name.outputClass(String outputClass) Sets the output class name.properties(Map<String, String> properties) Sets the properties.Sets a property.status(ModelInfo.ModelStatus status) Sets the model status.translator(String translator) Sets the translator class name.translatorFactory(String translatorFactory) Sets the translator factory class name.Sets the model type.Sets the model URL.Sets the model version.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
id
Sets the model ID.- Parameters:
id- Model ID- Returns:
- Builder instance
-
name
Sets the model name.- Parameters:
name- Model name- Returns:
- Builder instance
-
version
Sets the model version.- Parameters:
version- Model version- Returns:
- Builder instance
-
type
Sets the model type.- Parameters:
type- Model type- Returns:
- Builder instance
-
url
Sets the model URL.- Parameters:
url- Model URL- Returns:
- Builder instance
-
config
Sets the model configuration.- Parameters:
config- Model configuration- Returns:
- Builder instance
-
addProperty
Adds a property.- Parameters:
key- Property keyvalue- Property value- Returns:
- Builder instance
-
property
Sets a property.- Parameters:
key- Property keyvalue- Property value- Returns:
- Builder instance
-
properties
Sets the properties.- Parameters:
properties- Properties map- Returns:
- Builder instance
-
loaded
Sets the loaded status.- Parameters:
loaded- Whether loaded- Returns:
- Builder instance
-
loadTimestamp
Sets the load timestamp.- Parameters:
loadTimestamp- Load timestamp- Returns:
- Builder instance
-
status
Sets the model status.- Parameters:
status- Model status- Returns:
- Builder instance
-
inputClass
Sets the input class name.- Parameters:
inputClass- Input class name- Returns:
- Builder instance
-
outputClass
Sets the output class name.- Parameters:
outputClass- Output class name- Returns:
- Builder instance
-
translator
Sets the translator class name.- Parameters:
translator- Translator class name- Returns:
- Builder instance
-
translatorFactory
Sets the translator factory class name.- Parameters:
translatorFactory- Translator factory class name- Returns:
- Builder instance
-
from
Creates a new builder based on an existing ModelInfo.- Parameters:
modelInfo- The base ModelInfo- Returns:
- A builder initialized with values from the ModelInfo
-
build
Builds the ModelInfo instance.- Returns:
- ModelInfo instance
-