Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inference API returns an incorrect error message when inference ID = model ID #111312

Closed
ppf2 opened this issue Jul 25, 2024 · 5 comments · Fixed by #119543
Closed

Inference API returns an incorrect error message when inference ID = model ID #111312

ppf2 opened this issue Jul 25, 2024 · 5 comments · Fixed by #119543
Labels
>bug :ml Machine learning Team:ML Meta label for the ML team

Comments

@ppf2
Copy link
Member

ppf2 commented Jul 25, 2024

Elasticsearch Version

8.15

Installed Plugins

No response

Java Version

bundled

OS Version

Mac OS

Problem Description

When creating an inference endpoint using an inference_id that is identical to the model_id, it returns a misleading error suggesting that the inference API is trying to re-deploy the model again after eland has already deployed it to ML.

Steps to Reproduce

When creating an inference endpoint using an inference_id that is identical to the model_id:

PUT _inference/text_embedding/sentence-transformers__all-minilm-l6-v2
{
  "service": "elasticsearch",
  "service_settings": {
    "num_allocations": 1,
    "num_threads": 1,
    "model_id": "sentence-transformers__all-minilm-l6-v2" 
  }
}

It returns a misleading error message:

{
  "error": {
    "root_cause": [
      {
        "type": "status_exception",
        "reason": "Model IDs must be unique. Requested model ID [sentence-transformers__all-minilm-l6-v2] matches existing model IDs but must not."
      }
    ],
    "type": "status_exception",
    "reason": "Model IDs must be unique. Requested model ID [sentence-transformers__all-minilm-l6-v2] matches existing model IDs but must not."
  },
  "status": 400
}

The error should say something like the following instead:

Inference ID [<inference_id>] must be unique and must not match the <model_id>.

Logs (if relevant)

No response

@ppf2 ppf2 added >bug needs:triage Requires assignment of a team area label labels Jul 25, 2024
@ersalazar
Copy link

Hello; I'm looking for my first contribution, can I work on this?

@astefan astefan added the :SearchOrg/Inference Label for the Search Inference team label Jul 29, 2024
@elasticsearchmachine elasticsearchmachine added Team:SearchOrg Meta label for the Search Org (Enterprise Search) Team:Search - Inference and removed needs:triage Requires assignment of a team area label labels Jul 29, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/search-inference-team (Team:Search - Inference)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/ent-search-eng (Team:SearchOrg)

@astefan astefan added :ml Machine learning and removed Team:SearchOrg Meta label for the Search Org (Enterprise Search) :SearchOrg/Inference Label for the Search Inference team Team:Search - Inference labels Jul 29, 2024
@elasticsearchmachine elasticsearchmachine added the Team:ML Meta label for the ML team label Jul 29, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/ml-core (Team:ML)

@maxhniebergall
Copy link
Contributor

@ersalazar, that would be awesome! Let me know if you need any help, and please assign me to your PR when you create it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :ml Machine learning Team:ML Meta label for the ML team
Projects
None yet
5 participants