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>
Builder for
StartTrainedModelDeploymentRequest.-
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description StartTrainedModelDeploymentRequestbuild()Builds aStartTrainedModelDeploymentRequest.StartTrainedModelDeploymentRequest.BuildercacheSize(java.lang.String value)The inference cache size (in memory outside the JVM heap) per node for the model.StartTrainedModelDeploymentRequest.BuildermodelId(java.lang.String value)Required - The unique identifier of the trained model.StartTrainedModelDeploymentRequest.BuildernumberOfAllocations(java.lang.Integer value)The number of model allocations on each node where the model is deployed.StartTrainedModelDeploymentRequest.BuilderqueueCapacity(java.lang.Integer value)Specifies the number of inference requests that are allowed in the queue.StartTrainedModelDeploymentRequest.BuilderthreadsPerAllocation(java.lang.Integer value)Sets the number of threads used by each model allocation during inference.StartTrainedModelDeploymentRequest.Buildertimeout(Time value)Specifies the amount of time to wait for the model to deploy.StartTrainedModelDeploymentRequest.Buildertimeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)Specifies the amount of time to wait for the model to deploy.StartTrainedModelDeploymentRequest.BuilderwaitFor(DeploymentAllocationState value)Specifies the allocation status to wait for before returning.Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAllMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
cacheSize
public final StartTrainedModelDeploymentRequest.Builder cacheSize(@Nullable java.lang.String value)The inference cache size (in memory outside the JVM heap) per node for the model. The default value is the same size as themodel_size_bytes. To disable the cache,0bcan be provided.API name:
cache_size -
modelId
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
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
Builds aStartTrainedModelDeploymentRequest.- Specified by:
buildin interfaceObjectBuilder<StartTrainedModelDeploymentRequest>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-