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
Deprecate optuna study optimize
command.
#1384
Deprecate optuna study optimize
command.
#1384
Conversation
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.
Thanks for the PR, the description and changes seem reasonable. I just left a smaller comment on the error message.
Co-authored-by: Hiroyuki Vincent Yamazaki <hiroyuki.vincent.yamazaki@gmail.com>
@@ -253,7 +253,7 @@ def take_action(self, parsed_args): | |||
|
|||
|
|||
class _StudyOptimize(_BaseCommand): | |||
"""Start optimization of a study.""" | |||
"""Start optimization of a study. Deprecated since version 2.0.0.""" |
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 message might be a bit difficult to notice blending in, but it's not a strong opinion.
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 agree. This message is only shown in the list of commands. Do we remove it?
$ optuna
...
Commands:
complete print bash completion command (cliff)
create-study Create a new study.
dashboard Launch web dashboard (beta).
delete-study Delete a specified study.
help print detailed help for another command (cliff)
storage upgrade Upgrade the schema of a storage.
studies Show a list of studies.
study optimize Start optimization of a study. Deprecated since version 2.0.0.
study set-user-attr Set a user attribute to a study.
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 we don't have to remove it. It's helpful for users.
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.
LGTM!
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.
Thanks for the PR! LGTM!
Motivation
Optuna provides the CLI to invoke optimization from the shell, but it does not support some features like the pruning and the callback. This PR proposes to remove it in the future instead of adding the new feature support because of the following reasons:
Description of the changes
This PR adds a deprecation warning to
optuna study optimize
command.We need to update the code comment in the example files, but I leave them as they are to keep the diff small.