Class StartTrainedModelDeploymentRequest.Builder

java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.elasticsearch.ml.StartTrainedModelDeploymentRequest.Builder
All Implemented Interfaces:
ObjectBuilder<StartTrainedModelDeploymentRequest>
Enclosing class:
StartTrainedModelDeploymentRequest

public static class StartTrainedModelDeploymentRequest.Builder
extends ObjectBuilderBase
implements ObjectBuilder<StartTrainedModelDeploymentRequest>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • modelId

      public final StartTrainedModelDeploymentRequest.Builder modelId​(java.lang.String value)
      Required - The unique identifier of the trained model. Currently, only PyTorch models are supported.

      API name: model_id

    • numberOfAllocations

      public final StartTrainedModelDeploymentRequest.Builder numberOfAllocations​(@Nullable java.lang.Integer value)
      The number of model allocations on each node where the model is deployed. All allocations on a node share the same copy of the model in memory but use a separate set of threads to evaluate the model. Increasing this value generally increases the throughput. If this setting is greater than the number of hardware threads it will automatically be changed to a value less than the number of hardware threads.

      API name: number_of_allocations

    • queueCapacity

      public final StartTrainedModelDeploymentRequest.Builder queueCapacity​(@Nullable java.lang.Integer value)
      Specifies the number of inference requests that are allowed in the queue. After the number of requests exceeds this value, new requests are rejected with a 429 error.

      API name: queue_capacity

    • threadsPerAllocation

      public final StartTrainedModelDeploymentRequest.Builder threadsPerAllocation​(@Nullable java.lang.Integer value)
      Sets the number of threads used by each model allocation during inference. This generally increases the inference speed. The inference process is a compute-bound process; any number greater than the number of available hardware threads on the machine does not increase the inference speed. If this setting is greater than the number of hardware threads it will automatically be changed to a value less than the number of hardware threads.

      API name: threads_per_allocation

    • timeout

      public final StartTrainedModelDeploymentRequest.Builder timeout​(@Nullable Time value)
      Specifies the amount of time to wait for the model to deploy.

      API name: timeout

    • timeout

      public final StartTrainedModelDeploymentRequest.Builder timeout​(java.util.function.Function<Time.Builder,​ObjectBuilder<Time>> fn)
      Specifies the amount of time to wait for the model to deploy.

      API name: timeout

    • waitFor

      public final StartTrainedModelDeploymentRequest.Builder waitFor​(@Nullable DeploymentAllocationState value)
      Specifies the allocation status to wait for before returning.

      API name: wait_for

    • build

      Specified by:
      build in interface ObjectBuilder<StartTrainedModelDeploymentRequest>
      Throws:
      java.lang.NullPointerException - if some of the required fields are null.