Skip to content

Commit

Permalink
fix(utils): compare absolute difference during binary opt
Browse files Browse the repository at this point in the history
  • Loading branch information
Dariush Wahdany committed Jan 5, 2024
1 parent 9b90837 commit 144e7e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dp_learning_ff/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ def strictness_comp(
curr_obj = f(x)
if (
strictness_comp(curr_obj, target, strictly)
and target - curr_obj < abs_tol
and (target - curr_obj) / target < rel_tol
and abs(target - curr_obj) < abs_tol
and abs((target - curr_obj) / target) < rel_tol
):
break
if monotonicity_comp(x, target, f_monotonicity):
Expand Down

0 comments on commit 144e7e1

Please sign in to comment.