Create part of a trained model definition
Generally available; Added in 8.0.0
Required authorization
- Cluster privileges:
manage_ml
Body
Required
-
definition
string Required The definition part for the model. Must be a base64 encoded string.
-
total_definition_length
number Required The total uncompressed definition length in bytes. Not base64 encoded.
-
total_parts
number Required The total number of parts that will be uploaded. Must be greater than 0.
PUT
/_ml/trained_models/{model_id}/definition/{part}
Console
PUT _ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/definition/0
{
"definition": "...",
"total_definition_length": 265632637,
"total_parts": 64
}
curl \
--request PUT 'http://api.example.com/_ml/trained_models/{model_id}/definition/{part}' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '"{\n \"definition\": \"...\",\n \"total_definition_length\": 265632637,\n \"total_parts\": 64\n}"'
Request example
An example body for a `PUT _ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/definition/0` request.
{
"definition": "...",
"total_definition_length": 265632637,
"total_parts": 64
}