Test decision tree pickle for different endianness#21539
Merged
rth merged 4 commits intoscikit-learn:mainfrom Nov 4, 2021
Merged
Test decision tree pickle for different endianness#21539rth merged 4 commits intoscikit-learn:mainfrom
rth merged 4 commits intoscikit-learn:mainfrom
Conversation
1 task
Member
Author
Yep I was working on it in parallel since this touches the same code, I opened a draft PR with a similar approach: #21552. This is better to merge this one first. |
Member
Author
I have this in mind eventually but for now my current strategy is:
|
Member
|
OK, fair enough. Thanks! |
glemaitre
pushed a commit
to glemaitre/scikit-learn
that referenced
this pull request
Nov 29, 2021
samronsin
pushed a commit
to samronsin/scikit-learn
that referenced
this pull request
Nov 30, 2021
glemaitre
pushed a commit
to glemaitre/scikit-learn
that referenced
this pull request
Dec 24, 2021
glemaitre
pushed a commit
that referenced
this pull request
Dec 25, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
Close #21359
What does this implement/fix? Explain your changes.
This adds a test that checks that pickles containing big endian arrays can be loaded on a little-endian machine.
The way the pickles are created is to change the
Pickledispatch_tableor to reimplementNumpyPickle.savefor joblib pickles. This creates pickles with numpy arrays in big endian, which does not match exactly a pickle created on a big endian machine. The main advantage IMO is that we have some test for #17644 ...I thought it was simpler that using qemu inside a docker image (look at #21237 (comment) for more details) as mentioned in #19602 (comment).
Doing something similar for more (or even all estimators) as mentioned in #19602 (comment) is left for a future PR.