Class StartTrainedModelDeploymentRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<StartTrainedModelDeploymentRequest.Builder>
co.elastic.clients.elasticsearch.ml.StartTrainedModelDeploymentRequest.Builder
- All Implemented Interfaces:
WithJson<StartTrainedModelDeploymentRequest.Builder>
,ObjectBuilder<StartTrainedModelDeploymentRequest>
- Enclosing class:
- StartTrainedModelDeploymentRequest
public static class StartTrainedModelDeploymentRequest.Builder extends RequestBase.AbstractBuilder<StartTrainedModelDeploymentRequest.Builder> implements ObjectBuilder<StartTrainedModelDeploymentRequest>
Builder for
StartTrainedModelDeploymentRequest
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description StartTrainedModelDeploymentRequest
build()
Builds aStartTrainedModelDeploymentRequest
.StartTrainedModelDeploymentRequest.Builder
cacheSize(java.lang.String value)
The inference cache size (in memory outside the JVM heap) per node for the model.StartTrainedModelDeploymentRequest.Builder
modelId(java.lang.String value)
Required - The unique identifier of the trained model.StartTrainedModelDeploymentRequest.Builder
numberOfAllocations(java.lang.Integer value)
The number of model allocations on each node where the model is deployed.StartTrainedModelDeploymentRequest.Builder
queueCapacity(java.lang.Integer value)
Specifies the number of inference requests that are allowed in the queue.protected StartTrainedModelDeploymentRequest.Builder
self()
StartTrainedModelDeploymentRequest.Builder
threadsPerAllocation(java.lang.Integer value)
Sets the number of threads used by each model allocation during inference.StartTrainedModelDeploymentRequest.Builder
timeout(Time value)
Specifies the amount of time to wait for the model to deploy.StartTrainedModelDeploymentRequest.Builder
timeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)
Specifies the amount of time to wait for the model to deploy.StartTrainedModelDeploymentRequest.Builder
waitFor(DeploymentAllocationState value)
Specifies the allocation status to wait for before returning.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
Methods 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,0b
can 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
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<StartTrainedModelDeploymentRequest.Builder>
-
build
Builds aStartTrainedModelDeploymentRequest
.- Specified by:
build
in interfaceObjectBuilder<StartTrainedModelDeploymentRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-