Skip to content

[ML] Update Inference Settings cannot clear settings #126479

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

Open
prwhelan opened this issue Apr 8, 2025 · 1 comment
Open

[ML] Update Inference Settings cannot clear settings #126479

prwhelan opened this issue Apr 8, 2025 · 1 comment
Labels
>bug :ml Machine learning Team:ML Meta label for the ML team v9.1.0

Comments

@prwhelan
Copy link
Member

prwhelan commented Apr 8, 2025

Unsetting or explicitly setting a value to null does not clear the setting:
https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/cohere/embeddings/CohereEmbeddingsTaskSettings.java#L116

All of our updatedTaskSettings should check if a user is explicitly setting a field to null and, if so, clearing the field.

If a user creates an endpoint with input_type set:

    "task_settings": {
        "input_type": "search"
    }

An update like this should clear the input_type setting:

    "task_settings": {
        "input_type": null
    }

Whereas an update like this should not:

    "task_settings": {
    }

Workaround is to delete and recreate the endpoint with the desired task_settings

@prwhelan prwhelan added :ml Machine learning >bug Team:ML Meta label for the ML team v9.1.0 labels Apr 8, 2025
@elasticsearchmachine
Copy link
Collaborator

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

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 v9.1.0
Projects
None yet
Development

No branches or pull requests

2 participants