Path parameters
-
The unique identifier of the trained model. Currently, only PyTorch models are supported.
Query parameters
-
The inference cache size (in memory outside the JVM heap) per node for the model. The default value is the same size as the
model_size_bytes. To disable the cache,0bcan be provided. -
A unique identifier for the deployment of the model.
-
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.
Default value is
1. -
The deployment priority
Values are
normalorlow. -
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.
Default value is
1024. -
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.
Default value is
1. -
Specifies the amount of time to wait for the model to deploy.
Default value is
20s. -
Specifies the allocation status to wait for before returning.
Supported values include:
started: The trained model is started on at least one node.starting: Trained model deployment is starting but it is not yet deployed on any nodes.fully_allocated: Trained model deployment has started on all valid nodes.
Default value is
started.
POST _ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/deployment/_start?wait_for=started&timeout=1m
resp = client.ml.start_trained_model_deployment(
model_id="elastic__distilbert-base-uncased-finetuned-conll03-english",
wait_for="started",
timeout="1m",
)
const response = await client.ml.startTrainedModelDeployment({
model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english",
wait_for: "started",
timeout: "1m",
});
response = client.ml.start_trained_model_deployment(
model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english",
wait_for: "started",
timeout: "1m"
)
$resp = $client->ml()->startTrainedModelDeployment([
"model_id" => "elastic__distilbert-base-uncased-finetuned-conll03-english",
"wait_for" => "started",
"timeout" => "1m",
]);
curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/deployment/_start?wait_for=started&timeout=1m"
var response = await client.MachineLearning
.StartTrainedModelDeploymentAsync(modelId: "elastic__distilbert-base-uncased-finetuned-conll03-english", d1 => d1
.Timeout("1m")
.WaitFor(DeploymentAllocationState.Started)
);
client.ml().startTrainedModelDeployment(s -> s
.modelId("elastic__distilbert-base-uncased-finetuned-conll03-english")
.timeout(t -> t
.time("1m")
)
.waitFor(DeploymentAllocationState.Started)
);