-
-
Notifications
You must be signed in to change notification settings - Fork 215
Make all OpenML classes to inherit ReprMixin
#1567
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
Open
JATAYU000
wants to merge
15
commits into
openml:main
Choose a base branch
from
JATAYU000:repr_openmlsplit
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+114
−67
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e89ed3f
Added __repr__
JATAYU000 e7006d8
Merge branch 'main' into repr_openmlsplit
fkiraly e948f2e
[BUG] Temporarily fix issue #1586 by marking some failed tests as non…
EmanAbdelhaleem 4a3aae6
[BUG] Fix Sklearn Models detection by safely importing openml-sklearn…
EmanAbdelhaleem 8bbed43
refactor: updated OpenMLEvaluation to use dataclass decorator (#1559)
rohansen856 fa589ac
[MNT] Update Python version support and CI to include Python 3.14 (#1…
DDiyash 5dfa47d
Added RepeMixin in utils
JATAYU000 a76333e
[MNT] add pytest marker to tests requiring test server (#1599)
geetu040 d755d4c
Updated OpenML classes which require repr
JATAYU000 8450715
Merge branch 'main' into repr_openmlsplit
fkiraly 47bfec3
Merge branch 'main' into repr_openmlsplit
JATAYU000 d7c6406
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b295d38
Class requires __hash__
JATAYU000 ff648f8
Merge branch 'main' into repr_openmlsplit
JATAYU000 c76f884
set __hash__ None
JATAYU000 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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.
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 am not so sure about the custom implementation of
__hash__, I know it's a requirement frompre-commitbut we need to make sure we don't just write a bad implementation to satisfy thepre-commitchecksI think if it can be set to
None, and that shuts thepre-commitand is right choice in code and no sdk code currently depends on hashing then do it like that:If we want to implement
__hash__, given the implementation of__eq__, doesn't it make more sense to create hash by creating a tuple of tuples by looping over all (key, value) pairs ofself.__dict__Uh oh!
There was an error while loading. Please reload this page.
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.
self.__dict__would return unhashable items which would raise errors, Thats Why I picked immutable/hashable fieldsI have set it None and it does shut the pre-commit failure
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.
@fkiraly please have a look at this thread.
Is it fine to have
__hash__ = Nonefor a class?