FIX Disable endianness alteration on unserialization of numpy arrays in joblib.Parallel#1561
FIX Disable endianness alteration on unserialization of numpy arrays in joblib.Parallel#1561
joblib.Parallel#1561Conversation
8e1deb4 to
395e9de
Compare
|
Regarding the second and third points, in fact it's not an issue because |
395e9de to
b01f2b7
Compare
|
@alexisthual do you want to try this branch on your usecase and confirm that it fixes it ? |
ogrisel
left a comment
There was a problem hiding this comment.
Thanks for the PR. Here is some feedback. The big picture is that we should never pretend in the code that is possible to swap endianess of memory mapped arrays: the result would be a newly allocated array in memory and no longer backed by a memory mapped buffer managed by the OS.
|
Also we should not forget to document the fix in the changelog. |
f14b07a to
15fa6a9
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1561 +/- ##
==========================================
- Coverage 95.53% 95.49% -0.04%
==========================================
Files 46 46
Lines 7743 7775 +32
==========================================
+ Hits 7397 7425 +28
- Misses 346 350 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@ogrisel thanks for the review. Regarding the default values for occurences of After browsing the code more in depth, I think we can say that all the classes and functions that are changed in this PR ( Also I grep'ed joblib code and can say that those changes in So I understand that we can break the default behavior of those internal functions. WDYT doing it a bit differently of what you're suggesting, and instead of setting default
Can we re-discuss that in light of the previous commit too Still todo:
|
cd5f242 to
b968f3f
Compare
b968f3f to
aa04f09
Compare
joblib.Paralleljoblib.Parallel
joblib.Paralleljoblib.Parallel
ogrisel
left a comment
There was a problem hiding this comment.
Thanks for the update. I am fine with the design (passing an extra explicit argument in the private API) to be explicit everywhere.
I think we should further document this behavior in joblib.load and make it possible to disable native byte ordering conversion on regular numpy arrays.
tomMoral
left a comment
There was a problem hiding this comment.
A first pass on comment, trying to understand this so mostly rephrasing what I understood in the comments.
Co-authored-by: Thomas Moreau <thomas.moreau.2010@gmail.com>
|
Merging as the failure is present on main too. |
Fixes #1545
Still todo:
discuss where exactly we should enable / disable this feature ? to what extent should the issues in dtype.byteorder is not consistent during cross platform joblib.load() #1123 also be considered for unserialization of auto memmaped array injoblib.Parallel?discuss potential breaking change ?