Package org.opensearch.ml.common
Class MLModel
java.lang.Object
org.opensearch.ml.common.MLModel
- All Implemented Interfaces:
org.opensearch.core.xcontent.ToXContent,org.opensearch.core.xcontent.ToXContentObject
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.opensearch.core.xcontent.ToXContent
org.opensearch.core.xcontent.ToXContent.DelegatingMapParams, org.opensearch.core.xcontent.ToXContent.MapParams, org.opensearch.core.xcontent.ToXContent.Params -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringDeprecated.static final Stringstatic final Stringstatic final StringDeprecated.static final Stringstatic final StringDeprecated.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface org.opensearch.core.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionMLModel(String name, String modelGroupId, FunctionName algorithm, String version, String content, org.opensearch.commons.authuser.User user, String description, MLModelFormat modelFormat, MLModelState modelState, Long modelContentSizeInBytes, String modelContentHash, Boolean isEnabled, Boolean isControllerEnabled, MLRateLimiter rateLimiter, MLModelConfig modelConfig, MLDeploySetting deploySetting, Instant createdTime, Instant lastUpdateTime, Instant lastRegisteredTime, Instant lastDeployedTime, Instant lastUndeployedTime, Integer autoRedeployRetryTimes, String modelId, Integer chunkNumber, Integer totalChunks, Integer planningWorkerNodeCount, Integer currentWorkerNodeCount, String[] planningWorkerNodes, boolean deployToAllNodes, Boolean isHidden, Connector connector, String connectorId, Guardrails guardrails) MLModel(org.opensearch.core.common.io.stream.StreamInput input) -
Method Summary
Modifier and TypeMethodDescriptionstatic MLModel.MLModelBuilderbuilder()static MLModelfromStream(org.opensearch.core.common.io.stream.StreamInput in) getName()String[]org.opensearch.commons.authuser.UsergetUser()booleanstatic MLModelvoidsetConnector(Connector connector) voidsetDescription(String description) voidsetModelId(String modelId) org.opensearch.core.xcontent.XContentBuildertoXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) voidwriteTo(org.opensearch.core.common.io.stream.StreamOutput out) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.core.xcontent.ToXContentObject
isFragment
-
Field Details
-
ALGORITHM_FIELD
Deprecated.- See Also:
-
FUNCTION_NAME_FIELD
- See Also:
-
MODEL_NAME_FIELD
- See Also:
-
MODEL_GROUP_ID_FIELD
- See Also:
-
OLD_MODEL_VERSION_FIELD
- See Also:
-
MODEL_VERSION_FIELD
- See Also:
-
OLD_MODEL_CONTENT_FIELD
- See Also:
-
MODEL_CONTENT_FIELD
- See Also:
-
DESCRIPTION_FIELD
- See Also:
-
MODEL_FORMAT_FIELD
- See Also:
-
MODEL_STATE_FIELD
- See Also:
-
MODEL_CONTENT_SIZE_IN_BYTES_FIELD
- See Also:
-
MODEL_CONTENT_HASH_VALUE_FIELD
- See Also:
-
IS_ENABLED_FIELD
- See Also:
-
RATE_LIMITER_FIELD
- See Also:
-
IS_CONTROLLER_ENABLED_FIELD
- See Also:
-
MODEL_CONFIG_FIELD
- See Also:
-
DEPLOY_SETTING_FIELD
- See Also:
-
CREATED_TIME_FIELD
- See Also:
-
LAST_UPDATED_TIME_FIELD
- See Also:
-
LAST_UPLOADED_TIME_FIELD
Deprecated.- See Also:
-
LAST_LOADED_TIME_FIELD
Deprecated.- See Also:
-
LAST_UNLOADED_TIME_FIELD
Deprecated.- See Also:
-
LAST_REGISTERED_TIME_FIELD
- See Also:
-
LAST_DEPLOYED_TIME_FIELD
- See Also:
-
LAST_UNDEPLOYED_TIME_FIELD
- See Also:
-
MODEL_ID_FIELD
- See Also:
-
AUTO_REDEPLOY_RETRY_TIMES_FIELD
- See Also:
-
CHUNK_NUMBER_FIELD
- See Also:
-
TOTAL_CHUNKS_FIELD
- See Also:
-
PLANNING_WORKER_NODE_COUNT_FIELD
- See Also:
-
CURRENT_WORKER_NODE_COUNT_FIELD
- See Also:
-
PLANNING_WORKER_NODES_FIELD
- See Also:
-
DEPLOY_TO_ALL_NODES_FIELD
- See Also:
-
IS_HIDDEN_FIELD
- See Also:
-
CONNECTOR_FIELD
- See Also:
-
CONNECTOR_ID_FIELD
- See Also:
-
GUARDRAILS_FIELD
- See Also:
-
-
Constructor Details
-
MLModel
public MLModel(String name, String modelGroupId, FunctionName algorithm, String version, String content, org.opensearch.commons.authuser.User user, String description, MLModelFormat modelFormat, MLModelState modelState, Long modelContentSizeInBytes, String modelContentHash, Boolean isEnabled, Boolean isControllerEnabled, MLRateLimiter rateLimiter, MLModelConfig modelConfig, MLDeploySetting deploySetting, Instant createdTime, Instant lastUpdateTime, Instant lastRegisteredTime, Instant lastDeployedTime, Instant lastUndeployedTime, Integer autoRedeployRetryTimes, String modelId, Integer chunkNumber, Integer totalChunks, Integer planningWorkerNodeCount, Integer currentWorkerNodeCount, String[] planningWorkerNodes, boolean deployToAllNodes, Boolean isHidden, Connector connector, String connectorId, Guardrails guardrails) -
MLModel
- Throws:
IOException
-
-
Method Details
-
writeTo
- Throws:
IOException
-
toXContent
public org.opensearch.core.xcontent.XContentBuilder toXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.opensearch.core.xcontent.ToXContent- Throws:
IOException
-
parse
public static MLModel parse(org.opensearch.core.xcontent.XContentParser parser, String algorithmName) throws IOException - Throws:
IOException
-
fromStream
public static MLModel fromStream(org.opensearch.core.common.io.stream.StreamInput in) throws IOException - Throws:
IOException
-
builder
-
toBuilder
-
getName
-
getModelGroupId
-
getAlgorithm
-
getVersion
-
getContent
-
getUser
public org.opensearch.commons.authuser.User getUser() -
getDescription
-
getModelFormat
-
getModelState
-
getModelContentSizeInBytes
-
getModelContentHash
-
getModelConfig
-
getDeploySetting
-
getIsEnabled
-
getIsControllerEnabled
-
getRateLimiter
-
getCreatedTime
-
getLastUpdateTime
-
getLastRegisteredTime
-
getLastDeployedTime
-
getLastUndeployedTime
-
getModelId
-
getAutoRedeployRetryTimes
-
getChunkNumber
-
getTotalChunks
-
getPlanningWorkerNodeCount
-
getCurrentWorkerNodeCount
-
getPlanningWorkerNodes
-
isDeployToAllNodes
public boolean isDeployToAllNodes() -
getIsHidden
-
getConnector
-
getConnectorId
-
getGuardrails
-
setDescription
-
setModelId
-
setConnector
-