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

Fix memmapping_reducer when 'os' has no attribute 'statvfs' #1366

Merged
merged 4 commits into from
Nov 25, 2022

Conversation

rth
Copy link
Contributor

@rth rth commented Nov 24, 2022

Closes #902

In this case when 'os' has no attribute 'statvfs' we don't use /dev/shm even if it exists, as we are then not able to determine how much free space it has.

The other possible solution could be to ignore SYSTEM_SHARED_MEM_FS_MIN_SIZE and still write to /dev/shm.

The typical use case where this could happen is when running a Linux like system on Windows (which doesn't have statvfs apparently). I'm not sure what would be better.

@codecov
Copy link

codecov bot commented Nov 24, 2022

Codecov Report

Base: 93.92% // Head: 93.93% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (a811f53) compared to base (520dca5).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1366   +/-   ##
=======================================
  Coverage   93.92%   93.93%           
=======================================
  Files          52       52           
  Lines        7291     7300    +9     
=======================================
+ Hits         6848     6857    +9     
  Misses        443      443           
Impacted Files Coverage Δ
joblib/_memmapping_reducer.py 95.88% <100.00%> (ø)
joblib/test/test_memmapping.py 99.24% <100.00%> (+0.01%) ⬆️
joblib/parallel.py 96.29% <0.00%> (-0.27%) ⬇️
joblib/memory.py 95.51% <0.00%> (+0.26%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

Lgtm!

@ogrisel ogrisel merged commit 6836640 into joblib:master Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

module 'os' has no attribute 'statvfs'
2 participants