[tune] Fix an example for _Brackets of async hyperband scheduler (#7538)

This commit is contained in:
Seung Hyeon, Kim
2020-03-19 11:06:32 +09:00
committed by GitHub
parent 35a4bfc885
commit ee49f4a875
@@ -124,12 +124,12 @@ class _Bracket():
the correct rung corresponding to the current iteration of the result.
Example:
>>> b = _Bracket(1, 10, 2, 3)
>>> b = _Bracket(1, 10, 2, 0)
>>> b.on_result(trial1, 1, 2) # CONTINUE
>>> b.on_result(trial2, 1, 4) # CONTINUE
>>> b.cutoff(b._rungs[-1][1]) == 3.0 # rungs are reversed
>>> b.on_result(trial3, 1, 1) # STOP
>>> b.cutoff(b._rungs[0][1]) == 2.0
>>> b.cutoff(b._rungs[3][1]) == 2.0
"""
def __init__(self, min_t, max_t, reduction_factor, s):