Module org.elasticsearch.xcore
Class StartTrainedModelDeploymentAction.TaskParams
java.lang.Object
org.elasticsearch.xpack.core.ml.action.StartTrainedModelDeploymentAction.TaskParams
- All Implemented Interfaces:
Writeable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject,MlTaskParams
- Enclosing class:
StartTrainedModelDeploymentAction
public static class StartTrainedModelDeploymentAction.TaskParams
extends Object
implements MlTaskParams, Writeable, org.elasticsearch.xcontent.ToXContentObject
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final MlConfigVersionFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionTaskParams(String modelId, String deploymentId, long modelBytes, int numberOfAllocations, int threadsPerAllocation, int queueCapacity, ByteSizeValue cacheSize, Priority priority, long perDeploymentMemoryBytes, long perAllocationMemoryBytes) -
Method Summary
Modifier and TypeMethodDescriptionbooleanlongfromXContent(org.elasticsearch.xcontent.XContentParser parser) longgetMlId()The id of the ML config this task is executinglongintlonglongintintinthashCode()static booleanmayAssignToNode(DiscoveryNode node) toString()org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
VERSION_INTRODUCED
-
NUMBER_OF_ALLOCATIONS
public static final org.elasticsearch.xcontent.ParseField NUMBER_OF_ALLOCATIONS -
THREADS_PER_ALLOCATION
public static final org.elasticsearch.xcontent.ParseField THREADS_PER_ALLOCATION -
LEGACY_INFERENCE_THREADS
public static final org.elasticsearch.xcontent.ParseField LEGACY_INFERENCE_THREADS -
QUEUE_CAPACITY
public static final org.elasticsearch.xcontent.ParseField QUEUE_CAPACITY -
CACHE_SIZE
public static final org.elasticsearch.xcontent.ParseField CACHE_SIZE -
PRIORITY
public static final org.elasticsearch.xcontent.ParseField PRIORITY -
PER_DEPLOYMENT_MEMORY_BYTES
public static final org.elasticsearch.xcontent.ParseField PER_DEPLOYMENT_MEMORY_BYTES -
PER_ALLOCATION_MEMORY_BYTES
public static final org.elasticsearch.xcontent.ParseField PER_ALLOCATION_MEMORY_BYTES
-
-
Constructor Details
-
TaskParams
public TaskParams(String modelId, String deploymentId, long modelBytes, int numberOfAllocations, int threadsPerAllocation, int queueCapacity, @Nullable ByteSizeValue cacheSize, Priority priority, long perDeploymentMemoryBytes, long perAllocationMemoryBytes) -
TaskParams
- Throws:
IOException
-
-
Method Details
-
mayAssignToNode
-
fromXContent
public static StartTrainedModelDeploymentAction.TaskParams fromXContent(org.elasticsearch.xcontent.XContentParser parser) -
getModelId
-
getDeploymentId
-
estimateMemoryUsageBytes
public long estimateMemoryUsageBytes()- Returns:
- the estimated memory (in bytes) required for the model deployment to run
-
getMinimalSupportedVersion
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-
hashCode
public int hashCode() -
equals
-
getMlId
Description copied from interface:MlTaskParamsThe id of the ML config this task is executing- Specified by:
getMlIdin interfaceMlTaskParams
-
getModelBytes
public long getModelBytes() -
getThreadsPerAllocation
public int getThreadsPerAllocation()- Returns:
- the number of threads per allocation used by the model during inference. each thread requires one processor.
-
getNumberOfAllocations
public int getNumberOfAllocations()- Returns:
- the number of allocations requested by the user
-
getQueueCapacity
public int getQueueCapacity() -
getCacheSize
-
getCacheSizeBytes
public long getCacheSizeBytes() -
getPriority
-
getPerAllocationMemoryBytes
public long getPerAllocationMemoryBytes() -
getPerDeploymentMemoryBytes
public long getPerDeploymentMemoryBytes() -
toString
-