Skip to content

Commit bce79fa

Browse files
rbs333abrookins
authored andcommitted
update search step on recall and precision (#307)
We were experiencing flakiness with a similar test before and haven't had an issue (as far as I know) with that test since updating the search_step. Error occurs for this step when after 10 tries the random search hasn't made the threshold large enough to show improvement which is why it failed sometimes.
1 parent df574f5 commit bce79fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/integration/test_threshold_optimizer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def test_routes_different_distance_thresholds_optimizer_precision(
150150
router_optimizer = RouterThresholdOptimizer(
151151
router, test_data_optimization, eval_metric="precision"
152152
)
153-
router_optimizer.optimize(max_iterations=10)
153+
router_optimizer.optimize(max_iterations=10, search_step=0.5)
154154

155155
# test that it updated thresholds beyond the null case
156156
for route in routes:
@@ -186,7 +186,7 @@ def test_routes_different_distance_thresholds_optimizer_recall(
186186
router_optimizer = RouterThresholdOptimizer(
187187
router, test_data_optimization, eval_metric="recall"
188188
)
189-
router_optimizer.optimize(max_iterations=10)
189+
router_optimizer.optimize(max_iterations=10, search_step=0.5)
190190

191191
# test that it updated thresholds beyond the null case
192192
for route in routes:

0 commit comments

Comments
 (0)