Skip to content
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

[ML] Add option to disable inference process cache by default #108784

Merged
merged 6 commits into from
May 19, 2024

Conversation

maxhniebergall
Copy link
Member

Due to recent issues with the inference process cache in severless, we are adding the option to disable the inference process cache by default. On its own, this PR should have no functional effect. Once the corresponding elasticsearch-serverless PR is merged, the cache will be disabled on serverless.

This change will always allow the user to manually set the inference process cache.

@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine elasticsearchmachine added the Team:ML Meta label for the ML team label May 17, 2024
@maxhniebergall
Copy link
Member Author

failure due to esql IT

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.

@maxhniebergall
Copy link
Member Author

@elasticmachine merge upstream

}

private static CreateTrainedModelAssignmentAction.Response createResponse() {
return new CreateTrainedModelAssignmentAction.Response(mock(TrainedModelAssignment.class));
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of mocking it and needing remove final can you use the tests helper?

Or is it not accessible?

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, it's protected...so instead you could create a public method in that class that exposes it or you can just do what it's doing:

return new Response(TrainedModelAssignmentTests.randomInstance());

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 hadn't even considered that the object's tests would have their own instantiation function. Thanks!

@maxhniebergall
Copy link
Member Author

@elasticmachine merge upstream

@maxhniebergall maxhniebergall merged commit a2008bd into main May 19, 2024
16 checks passed
@maxhniebergall maxhniebergall deleted the disableServerlessMLCache branch May 19, 2024 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:ml Machine learning >non-issue Team:ML Meta label for the ML team v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants