elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.71k stars 24.67k forks source link

[ML] Cannot create inference endpoint with id `.elser_model_2` due to validation error #108426

Open davidkyle opened 4 months ago

davidkyle commented 4 months ago

Elasticsearch Version

8.13

Installed Plugins

No response

Java Version

bundled

OS Version

any

Problem Description

Creating an inference endpoint with an id starting with . causes the validation failure

action_request_validation_exception: Validation Failed: 1: Invalid inference_id; '.elser_model_2' can contain lowercase alphanumeric (a-z and 0-9), hyphens or underscores; must start and end with alphanumeric;

Given that the ELSER model id is .elser_model_2 it is reasonable that someone would want to use the same id.

Steps to Reproduce

PUT _inference/sparse_embedding/.elser_model_2
{
  "service": "elser",
  "service_settings": {
    "num_allocations": 1,
    "num_threads": 1
  }
}

Logs (if relevant)

No response

elasticsearchmachine commented 4 months ago

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