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 step
argument in IntLogUniformDistribution
.
#1387
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 good catch! LGTM!
Hi @nzw0301! I'm so sorry to comment after the approval. Could you take a look? With careful consideration, I've noticed that the |
@HideakiImamura Sure! Please don't worry about it. So, do I just add a warning message to the constructor of |
@nzw0301 Thanks for your swift reply! Yes, adding warning messages as the |
@HideakiImamura Thank you for your answer! I'm reading the codes and I think we cannot change the template of deprecated message defined in Lines 14 to 20 in 0a2c099
So I think this deprecated decorator's message may confuse users for this issue as you mentioned. So I will add a warning message not using this decorator... How do you think? |
In addition, even though I added the decorator to the Lines 87 to 97 in 0a2c099
__main__ (see ref). I suppose this behaviour is undesirable to notify users of the deprecation... (but my understanding may be wrong)
|
Thanks for your reply! Yes, this decorator can only be applied to the function or class, so we cannot apply the decorator to the argument. But, I think the contents of the deprecation massages should be same as that of the deprecation decorator. Do you think the ‘_DEFAULT_DEPRECATION_NOTE’ is not appropriate for the ‘step’ argument? (If we use it, the d_ver = deprecated version =2.0.0 and r_ver = removed version = 4.0.0.) |
@HideakiImamura Yes, I do. |
Oh! I see. How about giving the deprecation note not to whole of the class but only to the ‘step’ argument explanation like https://github.com/optuna/optuna/blob/master/optuna/pruners/_hyperband.py#L117? Then, users can understand that the ‘step’ argument will only be removed. |
I completely agree with you. I'm also thinking about your way 😎 . |
Related to #1329, I change the codes such that |
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 your quick update! I have a minor comment.
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 your swift action! LGTM again!
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 PR. It basically looks good to me, but I have two small comments.
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. It basically looks good to me, but let me add two small suggestions.
Co-authored-by: Toshihiko Yanase <toshihiko.yanase@gmail.com>
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. LGTM!
@hvy I think you assigned yourself to this PR. Do you review this PR?
Sorry, I didn't mean to block. Thanks @nzw0301 for your contribution as always and let me merge this PR as it's already approved by two! On a side note, the changes basically LGTM but I'm a bit worried that the deprecation is halfway in that the |
IntLogUniformDistribution
IntLogUniformDistribution
step
argument in IntLogUniformDistribution
.
Thank your kindful reviews as usual! @hvy I appreciate your follow-up PR! |
Motivation
Since #1329 disables
suggest_int
to usestep > 1
withlog=True
, we do not need to havestep
argument inIntLogUniformDistribution
.Description of the changes
This PR removes the
step
argument and refactors the sampling and tests codes.