Added warning to run_model_on_task to avoid duplicates if no authentication#1246
Merged
PGijsbers merged 3 commits intoopenml:developfrom Jun 13, 2023
Merged
Added warning to run_model_on_task to avoid duplicates if no authentication#1246PGijsbers merged 3 commits intoopenml:developfrom
PGijsbers merged 3 commits intoopenml:developfrom
Conversation
Added warning to run_model_on_task to avoid duplicates if no authentication
for more information, see https://pre-commit.ci
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #1246 +/- ##
===========================================
- Coverage 85.24% 85.16% -0.08%
===========================================
Files 38 38
Lines 5008 5010 +2
===========================================
- Hits 4269 4267 -2
- Misses 739 743 +4
... and 5 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
PGijsbers
requested changes
Apr 25, 2023
Collaborator
PGijsbers
left a comment
There was a problem hiding this comment.
Thanks for your contribution! Please see my suggestion
Comment on lines
+102
to
+107
| warnings.warn( | ||
| "avoid_duplicate_runs is set to True, but no API key is set. " | ||
| "Please set your API key in the OpenML configuration file " | ||
| "or pass it directly to the function.", | ||
| DeprecationWarning, | ||
| ) |
Collaborator
There was a problem hiding this comment.
Suggested change
| warnings.warn( | |
| "avoid_duplicate_runs is set to True, but no API key is set. " | |
| "Please set your API key in the OpenML configuration file " | |
| "or pass it directly to the function.", | |
| DeprecationWarning, | |
| ) | |
| warnings.warn( | |
| "avoid_duplicate_runs is set to True, but no API key is set. " | |
| "Please set your API key in the OpenML configuration file, see" | |
| "https://openml.github.io/openml-python/main/examples/20_basic/introduction_tutorial.html#authentication" | |
| " for more information on authentication.", | |
| ) |
Two changes:
- I don't think
DeprecationWarningis appropriate here because we are not informing about changed behavior/signature of the function, I would favor theUserWarning(which is the default warning type, so I left that argument implicit). - There is no way to pass the API key to the function, so that help text is incorrect. I updated the text to point to the documentation.
Collaborator
|
Sorry, missed the update. LGTM. Thanks for your contribution! |
PGijsbers
approved these changes
Jun 13, 2023
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.
Added warning to run_model_on_task to avoid duplicates if no authentication
Reference Issue
#1210