Class UpdateTrainedModelDeploymentRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<UpdateTrainedModelDeploymentRequest.Builder>
co.elastic.clients.elasticsearch.ml.UpdateTrainedModelDeploymentRequest.Builder
- All Implemented Interfaces:
WithJson<UpdateTrainedModelDeploymentRequest.Builder>
,ObjectBuilder<UpdateTrainedModelDeploymentRequest>
- Enclosing class:
- UpdateTrainedModelDeploymentRequest
public static class UpdateTrainedModelDeploymentRequest.Builder
extends RequestBase.AbstractBuilder<UpdateTrainedModelDeploymentRequest.Builder>
implements ObjectBuilder<UpdateTrainedModelDeploymentRequest>
Builder for
UpdateTrainedModelDeploymentRequest
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdaptive allocations configuration.adaptiveAllocations
(Function<AdaptiveAllocationsSettings.Builder, ObjectBuilder<AdaptiveAllocationsSettings>> fn) Adaptive allocations configuration.build()
Builds aUpdateTrainedModelDeploymentRequest
.Required - The unique identifier of the trained model.numberOfAllocations
(Integer value) The number of model allocations on each node where the model is deployed.self()
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
adaptiveAllocations
public final UpdateTrainedModelDeploymentRequest.Builder adaptiveAllocations(@Nullable AdaptiveAllocationsSettings value) Adaptive allocations configuration. When enabled, the number of allocations is set based on the current load. If adaptive_allocations is enabled, do not set the number of allocations manually.API name:
adaptive_allocations
-
adaptiveAllocations
public final UpdateTrainedModelDeploymentRequest.Builder adaptiveAllocations(Function<AdaptiveAllocationsSettings.Builder, ObjectBuilder<AdaptiveAllocationsSettings>> fn) Adaptive allocations configuration. When enabled, the number of allocations is set based on the current load. If adaptive_allocations is enabled, do not set the number of allocations manually.API name:
adaptive_allocations
-
modelId
Required - The unique identifier of the trained model. Currently, only PyTorch models are supported.API name:
model_id
-
numberOfAllocations
public final UpdateTrainedModelDeploymentRequest.Builder numberOfAllocations(@Nullable 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. If adaptive_allocations is enabled, do not set this value, because it’s automatically set.API name:
number_of_allocations
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<UpdateTrainedModelDeploymentRequest.Builder>
-
build
Builds aUpdateTrainedModelDeploymentRequest
.- Specified by:
build
in interfaceObjectBuilder<UpdateTrainedModelDeploymentRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-