Package org.gridgain.ml.model
Class MlJobParameters.Builder
java.lang.Object
org.gridgain.ml.model.ModelInfo.Builder
org.gridgain.ml.model.MlJobParameters.Builder
- Direct Known Subclasses:
MlBatchJobParameters.Builder,MlSimpleJobParameters.Builder,MlSqlJobParameters.Builder
- Enclosing class:
- MlJobParameters
Abstract base builder class for MlJobParameters.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Marshaller<?,byte[]> protected Class<? extends ComputeJob<?,?>> protected Marshaller<?,byte[]> protected MlJobParameters.OperationTypeprotected long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddProperty(String key, String value) Adds a property.abstract MlJobParametersbuild()Abstract build method that subclasses must implement.config(ModelConfig config) Sets the model configuration.customInputMarshaller(Marshaller<?, byte[]> customInputMarshaller) Sets the custom input marshaller instance.customJobClass(Class customJobClass) Sets the custom compute job class.customOutputMarshaller(Marshaller<?, byte[]> customOutputMarshaller) Sets the custom output marshaller instance.Creates the Builder from 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.operationType(MlJobParameters.OperationType operationType) Sets the operation type.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.Sets the timeout with time unit.timeoutSeconds(long timeoutSeconds) Sets the timeout in seconds.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.
-
Field Details
-
operationType
-
timeoutSeconds
protected long timeoutSeconds -
customJobClass
-
customInputMarshaller
-
customOutputMarshaller
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
id
Sets the model ID.- Overrides:
idin classModelInfo.Builder- Parameters:
id- Model ID- Returns:
- Builder instance
-
name
Sets the model name.- Overrides:
namein classModelInfo.Builder- Parameters:
name- Model name- Returns:
- Builder instance
-
version
Sets the model version.- Overrides:
versionin classModelInfo.Builder- Parameters:
version- Model version- Returns:
- Builder instance
-
type
Sets the model type.- Overrides:
typein classModelInfo.Builder- Parameters:
type- Model type- Returns:
- Builder instance
-
url
Sets the model URL.- Overrides:
urlin classModelInfo.Builder- Parameters:
url- Model URL- Returns:
- Builder instance
-
config
Sets the model configuration.- Overrides:
configin classModelInfo.Builder- Parameters:
config- Model configuration- Returns:
- Builder instance
-
addProperty
Adds a property.- Overrides:
addPropertyin classModelInfo.Builder- Parameters:
key- Property keyvalue- Property value- Returns:
- Builder instance
-
property
Sets a property.- Overrides:
propertyin classModelInfo.Builder- Parameters:
key- Property keyvalue- Property value- Returns:
- Builder instance
-
properties
Sets the properties.- Overrides:
propertiesin classModelInfo.Builder- Parameters:
properties- Properties map- Returns:
- Builder instance
-
loaded
Sets the loaded status.- Overrides:
loadedin classModelInfo.Builder- Parameters:
loaded- Whether loaded- Returns:
- Builder instance
-
loadTimestamp
Sets the load timestamp.- Overrides:
loadTimestampin classModelInfo.Builder- Parameters:
loadTimestamp- Load timestamp- Returns:
- Builder instance
-
status
Sets the model status.- Overrides:
statusin classModelInfo.Builder- Parameters:
status- Model status- Returns:
- Builder instance
-
inputClass
Sets the input class name.- Overrides:
inputClassin classModelInfo.Builder- Parameters:
inputClass- Input class name- Returns:
- Builder instance
-
outputClass
Sets the output class name.- Overrides:
outputClassin classModelInfo.Builder- Parameters:
outputClass- Output class name- Returns:
- Builder instance
-
translator
Sets the translator class name.- Overrides:
translatorin classModelInfo.Builder- Parameters:
translator- Translator class name- Returns:
- Builder instance
-
translatorFactory
Sets the translator factory class name.- Overrides:
translatorFactoryin classModelInfo.Builder- Parameters:
translatorFactory- Translator factory class name- Returns:
- Builder instance
-
from
Creates the Builder from ModelInfo.- Overrides:
fromin classModelInfo.Builder- Parameters:
modelInfo- The base ModelInfo- Returns:
- A builder initialized with values from the ModelInfo
-
operationType
Sets the operation type.- Parameters:
operationType- Operation type- Returns:
- Builder instance
-
timeoutSeconds
Sets the timeout in seconds.- Parameters:
timeoutSeconds- timeout in seconds- Returns:
- Builder instance
-
timeout
Sets the timeout with time unit.- Parameters:
timeout- timeout valueunit- time unit- Returns:
- Builder instance
-
customJobClass
Sets the custom compute job class.- Parameters:
customJobClass- Custom compute job class (must extend ComputeJob)- Returns:
- Builder instance
-
customInputMarshaller
Sets the custom input marshaller instance.- Parameters:
customInputMarshaller- Custom input marshaller instance (must extend Marshaller)- Returns:
- Builder instance
-
customOutputMarshaller
Sets the custom output marshaller instance.- Parameters:
customOutputMarshaller- Custom output marshaller instance (must extend Marshaller)- Returns:
- Builder instance
-
build
Abstract build method that subclasses must implement.- Overrides:
buildin classModelInfo.Builder- Returns:
- MlJobParameters instance
-