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
Test decision tree pickle for different endianness #21539
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
And +1 for a similar test (+fix) for #19602 in a follow-up PR to support pickling of tree structures that have system specific precision levels in their integer fields.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have this in mind eventually but for now my current strategy is:
|
OK, fair enough. Thanks! |
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
Pickle
dispatch_table
or to reimplementNumpyPickle.save
for 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.