Package org.gridgain.ml.model
Class MlJobParameters
java.lang.Object
org.gridgain.ml.model.ModelInfo
org.gridgain.ml.model.MlJobParameters
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
MlBatchJobParameters,MlSimpleJobParameters,MlSqlJobParameters
Machine Learning Job parameters that extends ModelInfo to include operation-specific configuration.
This class provides common functionality for all ML inference operations.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAbstract base builder class for MlJobParameters.static enumEnum defining the types of ML operations supported.Nested classes/interfaces inherited from class org.gridgain.ml.model.ModelInfo
ModelInfo.ModelStatus -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMlJobParameters(MlJobParameters.Builder builder) Protected constructor for subclasses. -
Method Summary
Modifier and TypeMethodDescription<T> Marshaller<T,byte[]> Gets the custom input marshaller.voidcustomInputMarshaller(Marshaller<?, byte[]> customInputMarshaller) Sets the custom input marshaller.Class<? extends ComputeJob<?,?>> Gets the custom compute job class.voidcustomJobClass(Class customJobClass) Sets the custom compute job class.<T> Marshaller<T,byte[]> Gets the custom output marshaller.voidcustomOutputMarshaller(Marshaller<?, byte[]> customOutputMarshaller) Sets the custom output marshaller.booleanChecks if custom components (job or marshallers) are configured.booleanhasUrl()Checks if url is configured.Gets the operation type.voidoperationType(MlJobParameters.OperationType operationType) Sets the operation type.longGets the timeout in seconds.voidtimeoutSeconds(long timeoutSeconds) Sets the timeout in seconds.toString()Creates and returns a string representation of only the key fields.voidvalidate()Validates the common parameters.protected abstract voidAbstract method for operation-specific validation.Methods inherited from class org.gridgain.ml.model.ModelInfo
config, id, inputClass, isLoaded, loadTimestamp, name, outputClass, properties, property, property, setInputClass, setLoaded, setOutputClass, setProperty, setStatus, setTranslator, setTranslatorFactory, setUrl, setVersion, status, translator, translatorFactory, type, url, version
-
Constructor Details
-
MlJobParameters
Protected constructor for subclasses.- Parameters:
builder- Builder instance
-
-
Method Details
-
operationType
Gets the operation type.- Returns:
- Operation type
-
operationType
Sets the operation type.- Parameters:
operationType- Operation type
-
timeoutSeconds
public long timeoutSeconds()Gets the timeout in seconds.- Returns:
- timeout in seconds
-
timeoutSeconds
public void timeoutSeconds(long timeoutSeconds) Sets the timeout in seconds.- Parameters:
timeoutSeconds- timeout in seconds
-
customJobClass
Gets the custom compute job class.- Returns:
- Custom compute job class, or null if not set
-
customJobClass
Sets the custom compute job class.- Parameters:
customJobClass- Custom compute job class
-
customInputMarshaller
Gets the custom input marshaller.- Type Parameters:
T- input type- Returns:
- Custom input marshaller, or null if not set
-
customInputMarshaller
Sets the custom input marshaller.- Parameters:
customInputMarshaller- Custom input marshaller instance
-
customOutputMarshaller
Gets the custom output marshaller.- Type Parameters:
T- output type- Returns:
- Custom output marshaller, or null if not set
-
customOutputMarshaller
Sets the custom output marshaller.- Parameters:
customOutputMarshaller- Custom output marshaller instance
-
hasCustomComponents
public boolean hasCustomComponents()Checks if custom components (job or marshallers) are configured.- Returns:
- true if any custom component is configured, false otherwise
-
hasUrl
public boolean hasUrl()Checks if url is configured.- Returns:
- true if url is configured, false otherwise
-
validate
public void validate()Validates the common parameters. Subclasses should override this method to add specific validation. -
validateOperationSpecific
protected abstract void validateOperationSpecific()Abstract method for operation-specific validation. Subclasses must implement this method to validate their specific fields. -
toString
Creates and returns a string representation of only the key fields.
-