Fix the method to calculate n_brackets in HyperbandPruner.#1188
Conversation
|
Related to #1182, |
|
@hvy Thank you for your review. I changed to use |
hvy
left a comment
There was a problem hiding this comment.
LGTM!
We might want to update the docs of the max_resource argument description. We can do that in a different PR, though.
Codecov Report
@@ Coverage Diff @@
## master #1188 +/- ##
=======================================
Coverage 91.06% 91.06%
=======================================
Files 142 142
Lines 12282 12287 +5
=======================================
+ Hits 11184 11189 +5
Misses 1098 1098
Continue to review full report at Codecov.
|
optuna/pruners/hyperband.py
Outdated
| paper corresponds to ``max_resource / min_resource``. This value represents and should | ||
| match the maximum iteration steps (e.g., the number of epochs for neural networks). | ||
| When this argument is "auto", the maximum resource is estimated according to the | ||
| completed trials. The default value of this argument is "auto". |
There was a problem hiding this comment.
With the last couple of sentences, this PR depends on #1171. Is it intentional?
Motivation
In the current implementation, we do not consider
min_resourceto calculaten_bracketsinHyperbandPruner. This leads to an unrealistic number of brackets whenmin_resourceis large. This PR aims to fix that issue.Description of the changes
n_bracketsas follows.n_brackets = floor(log_{reduction_factor}(max_resource / min_resource)) + 1