-
-
Notifications
You must be signed in to change notification settings - Fork 210
[BUG] Fix Sklearn Models detection by safely importing openml-sklearn #1556
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
base: main
Are you sure you want to change the base?
Conversation
geetu040
left a comment
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.
Nice, the safe import logic looks good.
Since this is specific to models and flows I would suggest we move it inside both functions in extensions/functions.py as you suggested before. Though it's still not the best place to put this, but we are restricted by circular imports and can improve the logic afterwards when extension classes are refactored
Also, could you improve the SKLEARN_HINT message, you can suggest to install it using pip install openml-sklearn
| "For more information, see " | ||
| "https://github.com/openml/openml-sklearn?tab=readme-ov-file#installation" | ||
| "You can use `pip install openml-sklearn` for installation." | ||
| ) |
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.
Keep the "for more information" lines at the very end. Perhaps we can refer to one of the following links for more information
I would prefer the second link, but let me know if you think otherwise.
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.
Since we are going to move openml-sklearn back to openml-python, I think the second link would be better.
fkiraly
left a comment
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.
Quick question - why does this work, given that openml_sklearn is not actually directly used? Is there some background magic that does something non-explicit, in case the module gets imported?
That feels very dangerous design, if it were so (fully aware that it is not yours).
Yes, the |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1556 +/- ##
==========================================
- Coverage 79.14% 79.09% -0.05%
==========================================
Files 36 36
Lines 4320 4325 +5
==========================================
+ Hits 3419 3421 +2
- Misses 901 904 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Metadata
Details
Fixed sklearn models detection by safely importing openml-sklearn at
openml/runs/__init__.py