Skip to content

Fix memory issues when computing retrieval metrics with high-valued indices#3291

Merged
justusschock merged 3 commits into
Lightning-AI:masterfrom
adaliaramon:fix-retrieval-memory-issues
Mar 4, 2026
Merged

Fix memory issues when computing retrieval metrics with high-valued indices#3291
justusschock merged 3 commits into
Lightning-AI:masterfrom
adaliaramon:fix-retrieval-memory-issues

Conversation

@adaliaramon

@adaliaramon adaliaramon commented Oct 16, 2025

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes #3290. No update to the docs or new test are required, as far as I can tell. Tests are passing.

Before submitting
  • Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?
PR review

Memory usage is now independent of the values of the indices.

Did you have fun?

Make sure you had fun coding 🙃


📚 Documentation preview 📚: https://torchmetrics--3291.org.readthedocs.build/en/3291/

@justusschock justusschock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Very Nice @adaliaramon ! Do you have comparison numbers in memory usage?

@adaliaramon

Copy link
Copy Markdown
Contributor Author

Not really but just from the example in the issue it comes down from 67 GB to basically nothing

@codecov

codecov Bot commented Oct 16, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 37%. Comparing base (8e1b7b3) to head (2ff5087).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #3291    +/-   ##
=======================================
- Coverage      37%     37%    -1%     
=======================================
  Files         364     349    -15     
  Lines       20098   19901   -197     
=======================================
- Hits         7521    7327   -194     
+ Misses      12577   12574     -3     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rittik9
rittik9 force-pushed the fix-retrieval-memory-issues branch from c6b86ce to 4c3094d Compare January 29, 2026 15:06
@mergify mergify Bot added the ready label Jan 29, 2026
@justusschock
justusschock merged commit 76d4262 into Lightning-AI:master Mar 4, 2026
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Retrieval metrics crash or use excessive memory with high-valued query indexes

3 participants