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
  • Field Details

    • VERSION_INTRODUCED

      public static final MlConfigVersion 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

      public TaskParams(StreamInput in) throws IOException
      Throws:
      IOException
  • Method Details

    • mayAssignToNode

      public static boolean mayAssignToNode(@Nullable DiscoveryNode node)
    • fromXContent

      public static StartTrainedModelDeploymentAction.TaskParams fromXContent(org.elasticsearch.xcontent.XContentParser parser)
    • getModelId

      public String getModelId()
    • getDeploymentId

      public String getDeploymentId()
    • estimateMemoryUsageBytes

      public long estimateMemoryUsageBytes()
      Returns:
      the estimated memory (in bytes) required for the model deployment to run
    • getMinimalSupportedVersion

      public MlConfigVersion getMinimalSupportedVersion()
    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • toXContent

      public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.xcontent.ToXContent
      Throws:
      IOException
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • getMlId

      public String getMlId()
      Description copied from interface: MlTaskParams
      The id of the ML config this task is executing
      Specified by:
      getMlId in interface MlTaskParams
    • 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

      public Optional<ByteSizeValue> getCacheSize()
    • getCacheSizeBytes

      public long getCacheSizeBytes()
    • getPriority

      public Priority getPriority()
    • getPerAllocationMemoryBytes

      public long getPerAllocationMemoryBytes()
    • getPerDeploymentMemoryBytes

      public long getPerDeploymentMemoryBytes()
    • toString

      public String toString()
      Overrides:
      toString in class Object