Create part of a trained model definition
Generally available
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
}
resp = client.ml.put_trained_model_definition_part(
model_id="elastic__distilbert-base-uncased-finetuned-conll03-english",
part="0",
definition="...",
total_definition_length=265632637,
total_parts=64,
)
const response = await client.ml.putTrainedModelDefinitionPart({
model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english",
part: 0,
definition: "...",
total_definition_length: 265632637,
total_parts: 64,
});
response = client.ml.put_trained_model_definition_part(
model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english",
part: "0",
body: {
"definition": "...",
"total_definition_length": 265632637,
"total_parts": 64
}
)
$resp = $client->ml()->putTrainedModelDefinitionPart([
"model_id" => "elastic__distilbert-base-uncased-finetuned-conll03-english",
"part" => "0",
"body" => [
"definition" => "...",
"total_definition_length" => 265632637,
"total_parts" => 64,
],
]);
curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d '{"definition":"...","total_definition_length":265632637,"total_parts":64}' "$ELASTICSEARCH_URL/_ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/definition/0"
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
}