-
Notifications
You must be signed in to change notification settings - Fork 52
Allow user to pass own tune.run
params in fit
#212
Conversation
tune_sklearn/tune_basesearch.py
Outdated
". This may cause unexpected issues! If you experience " | ||
"issues, please try removing those parameters from " | ||
"tune_params.") | ||
warnings.warn("Using user supplied tune_params.") |
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.
hmm, if a user passes this in, they wouldn't expect a warning here right?
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.
This probably should be an logging info message instead of a warning, now that I think about it
if user_overrides: | ||
warnings.warn( | ||
"The following preset tune.run parameters will " | ||
f"be overriden by tune_params: {', '.join(user_overrides)}" |
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.
this is a great error message!
tune_sklearn/tune_search.py
Outdated
@@ -626,6 +626,8 @@ def _tune_run(self, config, resources_per_trial): | |||
resources_per_trial (dict): Resources to use per trial within Ray. | |||
Accepted keys are `cpu`, `gpu` and custom resources, and values | |||
are integers specifying the number of each resource to use. | |||
tune_params (dict, optional): User defined parameters passed to |
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 think to get this to properly render on readthedocs, you can just leave this as (dict)
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.
Can you add a comment here also about the overriding behavior?
tune_sklearn/tune_search.py
Outdated
@@ -626,6 +626,8 @@ def _tune_run(self, config, resources_per_trial): | |||
resources_per_trial (dict): Resources to use per trial within Ray. | |||
Accepted keys are `cpu`, `gpu` and custom resources, and values | |||
are integers specifying the number of each resource to use. | |||
tune_params (dict, optional): User defined parameters passed to |
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.
Can you add a comment here also about the overriding behavior?
tune_sklearn/tune_basesearch.py
Outdated
"""Helper method to override tune.run run arguments with user | ||
supplied dict""" |
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.
nit (not important here but for future ref), the first line of the docstring is a summary line - and should not have a linebreak in the middle. this is important when building docs
Sorry I missed this! left some simple comments. Please assign me when you get around to addressing the issues! |
Thanks for letting me know about the docs! |
Will fix #211