Update a trained model deployment
Generally available; Added in 8.6.0
Path parameters
-
The unique identifier of the trained model. Currently, only PyTorch models are supported.
Query parameters
-
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.
Body
-
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.
curl \
--request POST 'http://api.example.com/_ml/trained_models/{model_id}/deployment/_update' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '"{\n \"number_of_allocations\": 4\n}"'
{
"number_of_allocations": 4
}