Skip to content

Conversation

@dan-rubinstein
Copy link
Member

@dan-rubinstein dan-rubinstein commented Feb 20, 2025

Description

This change adds endpoint creation validation to all task types for ElasticsearchInternalService. As part of this change we can refactor all of our other services to remove checkModelConfig as they all call ModelValidatorBuilder.buildModelValidator(...).validate(...). This can now be pulled out of the inference service and called directly in the TransportPutInferenceModelAction. This reduces the amount of duplicated code across inference service and test files. Part of this change also updates the model validators to take in a timeout value to ensure that the validation process ends if a users exceeds their requested timeout time.

TLDR of changes made in this PR to accomplish the above:

  1. Removing checkModelConfig from all services
  2. Adding timeouts to model validation process based on user provided timeout value.
  3. Adding a new model validator for ElasticsearchInternalService that starts the model before validation and stops it on validation failure.
  4. Updated our IT integration services to return valid values for text_embedding endpoint inferences. These test services were already being used to "create text_embedding endpoints" in our IT tests so they needed to have a inference response to pass validation.

Testing

  • Unit tests
  • Tested that creating a valid endpoint for each integration runs through validation and successfully makes a test call and creates the inference endpoint.
  • Tested that attempting to create an invalid endpoint fails the validation call and does not make the endpoint for each integration.

@dan-rubinstein dan-rubinstein added >enhancement :ml Machine learning Team:ML Meta label for the ML team v8.19.0 v9.1.0 labels Feb 20, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @dan-rubinstein, I've created a changelog YAML for you.

@dan-rubinstein dan-rubinstein changed the title Adding validation to ElasticsearchInternalService Adding endpoint creation validation to ElasticsearchInternalService Feb 20, 2025
@dan-rubinstein dan-rubinstein marked this pull request as ready for review March 13, 2025 17:01
@elasticsearchmachine
Copy link
Collaborator

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

Copy link
Contributor

@jonathan-buttner jonathan-buttner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just left a few questions

@dan-rubinstein dan-rubinstein added the auto-backport Automatically create backport pull requests when merged label Apr 7, 2025
@dan-rubinstein
Copy link
Member Author

@elasticmachine merge upstream

@dan-rubinstein dan-rubinstein merged commit 20f6a2a into elastic:main Apr 8, 2025
17 checks passed
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.x Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 123044

dan-rubinstein added a commit to dan-rubinstein/elasticsearch that referenced this pull request Apr 8, 2025
…lastic#123044)

* Adding validation to ElasticsearchInternalService

* Update docs/changelog/123044.yaml

* [CI] Auto commit changes from spotless

* Removing checkModelConfig

* Fixing IT

* [CI] Auto commit changes from spotless

* Remove DeepSeek checkModelConfig and fix tests

* Cleaning up comments, updating validation input type, and moving model deployment starting to model validator

---------

Co-authored-by: elasticsearchmachine <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
dan-rubinstein added a commit that referenced this pull request Apr 8, 2025
…123044) (#126472)

* Adding validation to ElasticsearchInternalService

* Update docs/changelog/123044.yaml

* [CI] Auto commit changes from spotless

* Removing checkModelConfig

* Fixing IT

* [CI] Auto commit changes from spotless

* Remove DeepSeek checkModelConfig and fix tests

* Cleaning up comments, updating validation input type, and moving model deployment starting to model validator

---------

Co-authored-by: elasticsearchmachine <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
@dan-rubinstein dan-rubinstein deleted the es-internal-service-validation branch April 15, 2025 18:05
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 backport pending >enhancement :ml Machine learning Team:ML Meta label for the ML team v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants