Skip to content

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

Merged
ogrisel merged 4 commits intojoblib:masterfrom
rth:902-fix-statvfs
Nov 25, 2022
Merged

Fix memmapping_reducer when 'os' has no attribute 'statvfs'#1366
ogrisel merged 4 commits intojoblib:masterfrom
rth:902-fix-statvfs

Conversation

@rth
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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