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
Continue to allow using IntLogUnioformDistribution.step
during deprecation.
#1438
Conversation
a7f1cb5
to
e37ffa7
Compare
e37ffa7
to
a1db0a3
Compare
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.
Thank you for your follow-up. It basically looks good to me, but I have small comments.
optuna/distributions.py
Outdated
def __repr__(self): | ||
# type: () -> str |
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.
Could you tell me why you use type comments for __repr__
and _asdict
?
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.
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?
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.
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.
Thanks a lot for the quick review. Comments should be address, PTAL. |
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
A minor follow-up to #1387 and specifically #1387 (comment).
Description of the changes
Allow users to continue using the
step
attribute ofIntLogUniformDistribution
during deprecation.