Create part of a trained model definition
Generally available; Added in 8.0.0
Path parameters
-
The unique identifier of the trained model.
-
The definition part number. When the definition is loaded for inference the definition parts are streamed in the order of their part number. The first part must be
0and the final part must betotal_parts - 1.
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
}