Module org.elasticsearch.xcore
Class StartTrainedModelDeploymentAction.TaskParams
java.lang.Object
org.elasticsearch.xpack.core.ml.action.StartTrainedModelDeploymentAction.TaskParams
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentObject,MlTaskParams
- Enclosing class:
StartTrainedModelDeploymentAction
public static class StartTrainedModelDeploymentAction.TaskParams
extends Object
implements MlTaskParams, Writeable, ToXContentObject
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, 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 ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldFields 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(XContentParser parser) longgetMlId()The id of the ML config this task is executinglongintlonglongintintinthashCode()static booleanmayAssignToNode(DiscoveryNode node) toString()toXContent(XContentBuilder builder, 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
-
NUMBER_OF_ALLOCATIONS
-
THREADS_PER_ALLOCATION
-
LEGACY_INFERENCE_THREADS
-
QUEUE_CAPACITY
-
CACHE_SIZE
-
PRIORITY
-
PER_DEPLOYMENT_MEMORY_BYTES
-
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
-
getModelId
-
getDeploymentId
-
estimateMemoryUsageBytes
public long estimateMemoryUsageBytes()- Returns:
- the estimated memory (in bytes) required for the model deployment to run
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- 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
-