Skip to content

Remove all mentions of eis and gateway and deprecate flags that do #116692

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 10 commits into from
Nov 21, 2024

Conversation

jaybcee
Copy link
Member

@jaybcee jaybcee commented Nov 12, 2024

We are deprecating the term eis in lieu of Elastic Inference Service. We also want to stop exposing the implementation detail that this is a gateway. Deprecating 2 flags added 2 new ones and refactored some code to support this idea.

Closes https://github.com/elastic/search-team/issues/8533

@elasticsearchmachine elasticsearchmachine added v9.0.0 external-contributor Pull request authored by a developer outside the Elasticsearch team labels Nov 12, 2024
@timgrein timgrein added >enhancement :ml Machine learning Team:ML Meta label for the ML team labels Nov 13, 2024
Copy link
Contributor

@timgrein timgrein left a comment

Choose a reason for hiding this comment

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

Thanks for taking care of this @jaybcee! Left some smaller suggestions/questions

@@ -15,6 +15,8 @@
*/
public class ElasticInferenceServiceFeature {

@Deprecated
public static final FeatureFlag ELASTIC_INFERENCE_SERVICE_FEATURE_FLAG = new FeatureFlag("eis");
Copy link
Contributor

@timgrein timgrein Nov 13, 2024

Choose a reason for hiding this comment

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

Maybe we could rename ELASTIC_INFERENCE_SERVICE_FEATURE_FLAG to DEPRECATED_INFERENCE_SERVICE_FEATURE_FLAG. Then it's also already clear from the constant name, which one to use.

public static final FeatureFlag ELASTIC_INFERENCE_SERVICE_FEATURE_FLAG = new FeatureFlag("eis");

public static final FeatureFlag INFERENCE_SERVICE_FEATURE_FLAG = new FeatureFlag("elastic_inference_service");
Copy link
Contributor

Choose a reason for hiding this comment

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

Just wondering why we prefix the setting with ELASTIC_ and the feature flag not. Maybe this could lead to confusion considering that we also have generic interfaces named InferenceService.

WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, it was simply because the suggestion was Feature flag -Des.eis_feature_flag_enabled=true --> -Des.inference.elastic.feature_flag_enabled=true

Maybe we change the old one to DEPRCATRED_EIS_FEATURE_FLAG and the new one to ELASTIC_INFERENCE_SERVICE_FEATURE_FLAG? It's just used in tests and when "enabling" the flag. WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good!

@@ -105,9 +105,9 @@ private URI createUri() throws URISyntaxException {

switch (modelId) {
case ElserModels.ELSER_V2_MODEL -> modelIdUriPath = "ELSERv2";
default -> throw new IllegalArgumentException("Unsupported model for EIS [" + modelId + "]");
default -> throw new IllegalArgumentException("Unsupported model for Elastic Inference Service [" + modelId + "]");
Copy link
Contributor

@timgrein timgrein Nov 13, 2024

Choose a reason for hiding this comment

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

Could we use a constant for Elastic Inference Service to make sure it stays consistent throughout log messages, error messages etc. I think we already have two places, where we use Elastic Inference Service (here and in the deprecation log warning message), right?

We could add it to ElasticInferenceService and maybe name it HUMAN_READABLE_NAME or something like that to distinguish from NAME?

Copy link
Member Author

@jaybcee jaybcee Nov 13, 2024

Choose a reason for hiding this comment

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

Good idea! Where should that live in your opinion? Added it to the InferencePlugin class. Lmk if thats ok.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks!

I think I would prefer if "human readable name" constant lives alongside the service provider NAME inside ElasticInferenceService.java. WDYT?

@timgrein timgrein removed the external-contributor Pull request authored by a developer outside the Elasticsearch team label Nov 13, 2024
@elasticsearchmachine
Copy link
Collaborator

Hi @jaybcee, I've created a changelog YAML for you.

@jaybcee jaybcee marked this pull request as ready for review November 14, 2024 21:21
@jaybcee jaybcee requested a review from timgrein November 14, 2024 21:21
@elasticsearchmachine
Copy link
Collaborator

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

Copy link
Contributor

@timgrein timgrein left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the changes!

@jaybcee jaybcee merged commit 0410229 into elastic:main Nov 21, 2024
16 checks passed
alexey-ivanov-es pushed a commit to alexey-ivanov-es/elasticsearch that referenced this pull request Nov 28, 2024
@jonathan-buttner
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Questions ?

Please refer to the Backport tool documentation

jonathan-buttner pushed a commit to jonathan-buttner/elasticsearch that referenced this pull request Jan 10, 2025
…lastic#116692)

(cherry picked from commit 0410229)

# Conflicts:
#	x-pack/plugin/inference/qa/inference-service-tests/src/javaRestTest/java/org/elasticsearch/xpack/inference/InferenceCrudIT.java
#	x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/InferencePlugin.java
#	x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/elastic/ElasticInferenceServiceSparseEmbeddingsModel.java
jonathan-buttner added a commit that referenced this pull request Jan 13, 2025
… do (#116692) (#119943)

* Remove all mentions of eis and gateway and deprecate flags that do (#116692)

(cherry picked from commit 0410229)

# Conflicts:
#	x-pack/plugin/inference/qa/inference-service-tests/src/javaRestTest/java/org/elasticsearch/xpack/inference/InferenceCrudIT.java
#	x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/InferencePlugin.java
#	x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/elastic/ElasticInferenceServiceSparseEmbeddingsModel.java

* Fixing tests

* Removing service api in 8.18

---------

Co-authored-by: Jason Botzas-Coluni <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :ml Machine learning Team:ML Meta label for the ML team v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants