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

chore: Disable the TraceMalloc allocator #21231

Merged
merged 3 commits into from
Feb 13, 2025

Conversation

coastalwhite
Copy link
Collaborator

No description provided.

@github-actions github-actions bot added internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars labels Feb 13, 2025
Copy link

codecov bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.76%. Comparing base (03df8e4) to head (5e2e711).
Report is 35 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #21231      +/-   ##
==========================================
- Coverage   79.76%   79.76%   -0.01%     
==========================================
  Files        1594     1593       -1     
  Lines      228142   228119      -23     
  Branches     2600     2600              
==========================================
- Hits       181974   181949      -25     
- Misses      45571    45573       +2     
  Partials      597      597              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@coastalwhite
Copy link
Collaborator Author

@itamarst, pinging you since you added this and were involved with python/cpython#128679.

I have basically removed the tracemalloc infrastructure here while leaving the MemoryUsage fixture on the Python side for a possible future implementation. It is really useful to have a good (peak) memory usage tracking solution for the tests and CI, but this is not really it. We would be open to a different implementation relying on psutils or something alike. Although, I am not sure how compatible that is with pytest.

@coastalwhite coastalwhite merged commit 9bcff72 into pola-rs:main Feb 13, 2025
18 checks passed
@coastalwhite coastalwhite deleted the chore/disable-trace-malloc branch February 13, 2025 10:32
@itamarst
Copy link
Contributor

Yep, totally understand. Another possibility is memray, which works with a completely different mechanism, so I will look into that as a replacement.

Is there an upstream bug filed with CPython about this?

@coastalwhite
Copy link
Collaborator Author

Yep, totally understand. Another possibility is memray, which works with a completely different mechanism, so I will look into that as a replacement.

Is there an upstream bug filed with CPython about this?

We did not reproduce outside the CI so I was unable to make an MRE. I also did see memray, not 100% about their approach, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants