Skip to content

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

Merged
merged 2 commits into from
Apr 11, 2025

Conversation

pquentin
Copy link
Member

@pquentin pquentin added >non-issue :ml Machine learning auto-backport Automatically create backport pull requests when merged v8.18.1 v8.19.0 v9.0.1 v9.1.0 labels Apr 10, 2025
@elasticsearchmachine elasticsearchmachine added the Team:ML Meta label for the ML team label Apr 10, 2025
@elasticsearchmachine
Copy link
Collaborator

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

"url": {
"paths": [
{
"path": "/_inference/{inference_id}",
Copy link
Contributor

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?

Copy link
Member Author

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}",
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member

@davidkyle davidkyle left a 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}",
Copy link
Member

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.

@pquentin pquentin merged commit 1f68bfb into elastic:main Apr 11, 2025
17 checks passed
pquentin added a commit to pquentin/elasticsearch that referenced this pull request Apr 11, 2025
pquentin added a commit to pquentin/elasticsearch that referenced this pull request Apr 11, 2025
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.18
8.x
9.0

pquentin added a commit to pquentin/elasticsearch that referenced this pull request Apr 11, 2025
@pquentin pquentin deleted the add-back-inference.inference branch April 11, 2025 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged :ml Machine learning >non-issue Team:ML Meta label for the ML team v8.18.1 v8.19.0 v9.0.1 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants