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

Continue to allow using IntLogUnioformDistribution.step during deprecation. #1438

Merged
merged 3 commits into from Jun 30, 2020

Conversation

hvy
Copy link
Member

@hvy hvy commented Jun 26, 2020

Motivation

A minor follow-up to #1387 and specifically #1387 (comment).

Description of the changes

Allow users to continue using the step attribute of IntLogUniformDistribution during deprecation.

@hvy hvy force-pushed the int-log-uniform-dist-allow-step branch from a7f1cb5 to e37ffa7 Compare June 26, 2020 06:46
@hvy hvy added this to the v2.0.0 milestone Jun 26, 2020
@hvy hvy force-pushed the int-log-uniform-dist-allow-step branch from e37ffa7 to a1db0a3 Compare June 26, 2020 07:14
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 follow-up. It basically looks good to me, but I have small comments.

optuna/distributions.py Outdated Show resolved Hide resolved
Comment on lines 355 to 356
def __repr__(self):
# type: () -> str
Copy link
Member

Choose a reason for hiding this comment

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

Could you tell me why you use type comments for __repr__ and _asdict?

Copy link
Member Author

Choose a reason for hiding this comment

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

Aligned with BaseDistribution. IntLogUniformDistribution as well as this entire module is mixed with modern/comment style type hints, but I aligned the type hints for this class now to modern style. What do you think?

Copy link
Member

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. I think we migrate the type hinting gradually, and we can use the new style if we do not have specific reasons.

@toshihikoyanase toshihikoyanase self-assigned this Jun 26, 2020
@hvy
Copy link
Member Author

hvy commented Jun 26, 2020

Thanks a lot for the quick review. Comments should be address, PTAL.

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.

LGTM!

Copy link
Member

@HideakiImamura HideakiImamura left a 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.

@HideakiImamura HideakiImamura merged commit 92c3edc into optuna:master Jun 30, 2020
@hvy hvy deleted the int-log-uniform-dist-allow-step branch June 30, 2020 08:22
@hvy hvy added the compatibility Change that breaks compatibility. label Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Change that breaks compatibility.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants