joblib icon indicating copy to clipboard operation
joblib copied to clipboard

quickfix: mmap_mode to None should set max_nbytes to None

Open thiswillbeyourgithub opened this issue 3 years ago • 3 comments

A PR was asked by @ogrisel in this issue.

This seems of small importance and the patch is minimal but it passes the test script mentionned in the issue above.

edit : If I'm understanding code coverage correctly, the reduction in code coverage is expected and a good thing in this case, right ?

thiswillbeyourgithub avatar Sep 08 '22 15:09 thiswillbeyourgithub

Codecov Report

Merging #1325 (24580ea) into master (1f00a1c) will decrease coverage by 14.35%. The diff coverage is 28.57%.

@@             Coverage Diff             @@
##           master    #1325       +/-   ##
===========================================
- Coverage   93.91%   79.55%   -14.36%     
===========================================
  Files          50       50               
  Lines        7275     7103      -172     
===========================================
- Hits         6832     5651     -1181     
- Misses        443     1452     +1009     
Impacted Files Coverage Δ
joblib/test/test_memmapping.py 33.91% <25.00%> (-65.34%) :arrow_down:
joblib/parallel.py 95.77% <50.00%> (-0.78%) :arrow_down:
joblib/test/test_dask.py 3.58% <0.00%> (-87.59%) :arrow_down:
joblib/_dask.py 24.01% <0.00%> (-68.67%) :arrow_down:
joblib/_memmapping_reducer.py 61.27% <0.00%> (-34.61%) :arrow_down:
joblib/executor.py 76.19% <0.00%> (-23.81%) :arrow_down:
joblib/backports.py 50.50% <0.00%> (-19.20%) :arrow_down:
joblib/test/testutils.py 33.33% <0.00%> (-16.67%) :arrow_down:
joblib/pool.py 72.13% <0.00%> (-16.49%) :arrow_down:
... and 23 more

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

codecov[bot] avatar Sep 08 '22 15:09 codecov[bot]

edit : If I'm understanding code coverage correctly, the reduction in code coverage is expected and a good thing in this case, right ?

No, it highlights the fact that we have no existing test that calls Parallel with mmap_mode=None. Please add a new one. You can take inspiration of the existing tests for the max_nbytes parameter.

Please also add an entry to document the change (as a bugfix) in the CHANGES.rst file.

ogrisel avatar Sep 12 '22 08:09 ogrisel

I edited CHANGES.rst and tried to add a test but I've never used pytest so it doesn't seem to work. I'm afraid I won't be able to figure out a good test sorry.

thiswillbeyourgithub avatar Sep 12 '22 12:09 thiswillbeyourgithub