Skip to content

Add update_trained_model_deployment to ML client #2562

@jeffvestal

Description

@jeffvestal

Describe the feature:

Elasticsearch version (bin/elasticsearch --version):
8.13.2

elasticsearch-py version (elasticsearch.__versionstr__):
8.13.2 & serverless

Description of the problem including expected versus actual behavior:

To update a trained model allocations, the main docs have the example:

resp = client.ml.update_trained_model_deployment(
    model_id="elastic__distilbert-base-uncased-finetuned-conll03-english",
    body={"number_of_allocations": 4},
)
print(resp)

Steps to reproduce:
The ml client doesn't to have that actual function.

<ipython-input-24-790add7c67c1> in <cell line: 1>()
----> 1 resp = es.ml.update_trained_model_deployment(
      2     model_id="my-elser-model",
      3     body={
      4         "number_of_allocations": 1
      5         },

AttributeError: 'MlClient' object has no attribute '<ipython-input-24-790add7c67c1> in <cell line: 1>()
----> 1 resp = es.ml.update_trained_model_deployment(
      2     model_id="my-elser-model",
      3     body={
      4         "number_of_allocations": 1
      5         },

AttributeError: 'MlClient' object has no attribute 'update_trained_model_deployment''

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions