Skip to content

Fix memory usage estimation for ELSER models #131630

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

Conversation

jan-elastic
Copy link
Contributor

No description provided.

@jan-elastic jan-elastic added >bug :ml Machine learning Team:ML Meta label for the ML team auto-backport Automatically create backport pull requests when merged v9.2.0 v9.1.1 v8.19.1 v9.0.5 v8.17.10 v8.18.5 labels Jul 21, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine
Copy link
Collaborator

Hi @jan-elastic, I've created a changelog YAML for you.

@@ -96,7 +99,7 @@ boolean hasEverBeenAllocated() {

public long estimateMemoryUsageBytes(int allocations) {
return StartTrainedModelDeploymentAction.estimateMemoryUsageBytes(
deploymentId,
modelId,
Copy link
Contributor Author

@jan-elastic jan-elastic Jul 21, 2025

Choose a reason for hiding this comment

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

These are the important changes: passing the model ID instead of the deployment ID to the memory estimator.

If the deployment ID is passed, the method isElserV1Or2Model doesn't work, because it's passed .elser-2-elasticsearch or my-elser, which doesn't start with .elser_model_2.

@jan-elastic jan-elastic force-pushed the pass-inference-model-id-to-memory-estimator branch from 38afae6 to 874149d Compare July 21, 2025 14:46
@jan-elastic jan-elastic changed the title Pass model ID instead of deployment ID to memory estimator Fix memory usage estimation for ELSER models Jul 21, 2025
@jan-elastic jan-elastic requested a review from davidkyle July 22, 2025 05:59
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 Good catch

@jan-elastic jan-elastic merged commit f393dba into elastic:main Jul 22, 2025
33 checks passed
jan-elastic added a commit to jan-elastic/elasticsearch that referenced this pull request Jul 22, 2025
* Pass model ID instead of deployment ID to memory estimator

* Update docs/changelog/131630.yaml
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
9.1
8.19 Commit could not be cherrypicked due to conflicts
9.0
8.17 Commit could not be cherrypicked due to conflicts
8.18 Commit could not be cherrypicked due to conflicts

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

jan-elastic added a commit to jan-elastic/elasticsearch that referenced this pull request Jul 22, 2025
* Pass model ID instead of deployment ID to memory estimator

* Update docs/changelog/131630.yaml
elasticsearchmachine pushed a commit that referenced this pull request Jul 22, 2025
* Pass model ID instead of deployment ID to memory estimator

* Update docs/changelog/131630.yaml
elasticsearchmachine pushed a commit that referenced this pull request Jul 22, 2025
* Pass model ID instead of deployment ID to memory estimator

* Update docs/changelog/131630.yaml
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 >bug :ml Machine learning Team:ML Meta label for the ML team v9.0.5 v9.1.1 v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy