Skip to content

Commit 98016e8

Browse files
authored
Fix flaky holder table test by increasing max function calls (#3129)
The test was failing ~5-10% of the time with 200 evaluations because find_min_global occasionally converges to a local minimum. Increasing to 300 evaluations eliminates flakiness while keeping the test fast.
1 parent 0f86c88 commit 98016e8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tools/python/test/test_global_optimization.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ def holder_table(x0,x1):
6262
return -abs(sin(x0)*cos(x1)*exp(abs(1-sqrt(x0*x0+x1*x1)/pi)))
6363

6464
def test_on_holder_table():
65-
x,y = find_min_global(holder_table,
66-
[-10,-10],
67-
[10,10],
68-
200)
65+
x,y = find_min_global(holder_table,
66+
[-10,-10],
67+
[10,10],
68+
300)
6969
assert (y - -19.2085025679) < 1e-7

0 commit comments

Comments
 (0)