1662 cannot pickle preprocessingordinalencoder instance (#1759)#1774
Open
kulbachcedric wants to merge 2 commits intomainfrom
Open
1662 cannot pickle preprocessingordinalencoder instance (#1759)#1774kulbachcedric wants to merge 2 commits intomainfrom
kulbachcedric wants to merge 2 commits intomainfrom
Conversation
* Add SkipCounter class * Remove class
Member
|
@kulbachcedric normally we have systematic unit tests to check each class can be picked. Could you take a look at why this class wasn't tested? There must be something missing in the test suite. |
* Add SkipCounter class * Remove class * Check every model for pickling
MaxHalford
reviewed
Mar 29, 2026
Comment on lines
+148
to
+149
| def check_pickling_supports_roundtrip(model): | ||
| assert isinstance(pickle.loads(pickle.dumps(model)), model.__class__) |
Member
There was a problem hiding this comment.
We already have check_pickling. Can you check why it's not running OrdinalEncoder?
Contributor
Author
There was a problem hiding this comment.
We have check_pickling but it takes a model and a dataset (not only a model) and that's why the OrdinalEncoder was not checked. As I quick fix, I added the check_pickling_supports_roundtrip method
Member
There was a problem hiding this comment.
Ok good point. Doesn't hurt adding this test anyway
MaxHalford
approved these changes
Mar 30, 2026
Member
|
An update to ruff was merged, so you have some conflicts to fix. |
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.
No description provided.