Skip to content

Commit

Permalink
Adjust hyperparam for disc
Browse files Browse the repository at this point in the history
  • Loading branch information
yhna940 committed May 30, 2022
1 parent ad755c7 commit b9a3acd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mmtune/ray/searchers/trust_region.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __init__(
trust_region_shrink_rate: float = 0.5,
min_trust_region: float = 0.5**7,
init_trust_region: float = 0.8,
suc_bound: float = 1e-3,
suc_bound: float = 0.,
max_cholesky_size: int = 2048): # noqa E129

self.metas = metas
Expand Down Expand Up @@ -183,7 +183,7 @@ def _adjust_trust_region(self, y: float):
y_best = np.min(self.history['y']) if self.mode == 'min' else np.max(
self.history['y'])
comp_op = partial(
operator.gt if self.mode == 'min' else operator.lt,
operator.ge if self.mode == 'min' else operator.le,
y_best - math.fabs(y_best) * self.suc_bound if self.mode == 'min'
else y_best + math.fabs(y_best) * self.suc_bound)
if comp_op(y):
Expand Down

0 comments on commit b9a3acd

Please sign in to comment.