-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Add back inference.inference API #126601
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
Add back inference.inference API #126601
Conversation
Pinging @elastic/ml-core (Team:ML) |
"url": { | ||
"paths": [ | ||
{ | ||
"path": "/_inference/{inference_id}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in most places we're directing users to include the task_type
in the URL. Would it cause problems if we remove this path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allowing to call the Inference API without a task type is how Kibana deploys a model. Enforcing the task type apparently makes things more complex here.
} | ||
}, | ||
{ | ||
"path": "/_inference/{task_type}/{inference_id}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need this form as it is covered by inference.text_embedding
, inference.sparse_embedding
etc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mainly wanted to include it for backward compatibility. It could prove helpful if a new task type is added to Elasticsearch but not added immediately in the specification, but a missing task type sounds much less likely than a missing provider. We could deprecate this form.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could prove helpful if a new task type is added to Elasticsearch but not added immediately in the specification
True, let's leave it in for now if it becomes problematic it can be removed without breaking any existing usage as the inference.{TASK_TYPE}
cases cover everything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
} | ||
}, | ||
{ | ||
"path": "/_inference/{task_type}/{inference_id}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could prove helpful if a new task type is added to Elasticsearch but not added immediately in the specification
True, let's leave it in for now if it becomes problematic it can be removed without breaking any existing usage as the inference.{TASK_TYPE}
cases cover everything.
See elastic/elasticsearch-specification#4256 for details.