Skip to content
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

Apply experimental decorator. #1424

Conversation

HideakiImamura
Copy link
Member

Motivation

Apply the experimental decorator to classes which are experimental without the experimental decorator.

Description of the changes

This PR applies the experimental decorator to the following classes:

  • optuna.dashboard
  • optuna.integration.sklearn.OptunaSearchCV

@HideakiImamura HideakiImamura added the code-fix Change that does not change the behavior, such as code refactoring. label Jun 24, 2020
Copy link
Member

@toshihikoyanase toshihikoyanase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just started the review of this PR, but let me leave a comment.

def _show_experimental_warning():
# type: () -> None

logger = optuna.logging.get_logger(__name__)
logger.warning("Optuna dashboard is still highly experimental. Please use with caution!")
warnings.warn("Optuna dashboard is still highly experimental. Please use with caution!")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The message shown in the console is as follows:

optuna/_experimental.py:63: ExperimentalWarning:

_show_experimental_warning is experimental (supported from v0.1.0). The interface can change in the future.

optuna/dashboard.py:264: UserWarning:

Optuna dashboard is still highly experimental. Please use with caution!
  1. I think the target of experimental warning is the dashboard, not _show_experimental_warning
  2. The warning was divided into two. I think multiple warnings for a single issue may be confusing. Do we add the text argument to @experimental like @deprecated?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your comments. I totally agree with you.

  1. I will specify the name argument for the experimental decorator.
  2. I will remove the second warning because it is sufficient here to note the default message of the experimental decorator. BTW, it might be good to give the text argument to the experimental decorator.

@toshihikoyanase toshihikoyanase self-assigned this Jun 24, 2020
Copy link
Member

@hvy hvy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@toshihikoyanase toshihikoyanase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your update. LGTM!

@toshihikoyanase toshihikoyanase merged commit 1780e3a into optuna:master Jun 25, 2020
@toshihikoyanase toshihikoyanase added this to the v2.0.0 milestone Jun 25, 2020
@HideakiImamura HideakiImamura deleted the code-fix/apply-experimental-decorator branch June 9, 2023 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-fix Change that does not change the behavior, such as code refactoring.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants