Skip to content

Commit 424d440

Browse files
committed
what
1 parent 2c184e7 commit 424d440

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

scripts/timing/test_timing.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@ def run_fcmaes(f: ioh.ProblemType, dim: int, n_evaluations, x0: np.ndarray):
4747

4848
# ret = retry.minimize(f, bounds.T, optimizer=optimizer.Cma_cpp(n_evaluations))
4949
assert f.state.evaluations >= n_evaluations
50+
print(f.state.current_best_internal.y)
5051

5152

5253
@timeit
5354
def run_modma(f: ioh.ProblemType, dim: int, n_evaluations, x0: np.ndarray):
54-
modcma.constants.calc_eigv = True
55+
modcma.constants.calc_eigv = False
5556
modules = modcma.parameters.Modules()
5657
# modules.sample_transformation = modcma.options.SCALED_UNIFORM
5758
modules.matrix_adaptation = modcma.options.COVARIANCE
@@ -74,7 +75,7 @@ def run_modma(f: ioh.ProblemType, dim: int, n_evaluations, x0: np.ndarray):
7475
while cma.step(f):
7576
pass
7677
# cma.run(f)
77-
print(cma.p.stats.t, cma.p.stats.n_updates)
78+
print(cma.p.stats.t, cma.p.stats.n_updates, f.state.current_best_internal.y)
7879
assert f.state.evaluations >= n_evaluations
7980
return cma
8081

@@ -100,8 +101,8 @@ def run_modma(f: ioh.ProblemType, dim: int, n_evaluations, x0: np.ndarray):
100101

101102

102103
if __name__ == "__main__":
103-
n_iters = 3
104-
n_evals = 1_000
104+
n_iters = 2
105+
n_evals = 2_000
105106
fid = 12
106107
dimensions = [100]
107108
names, functions = zip(

0 commit comments

Comments
 (0)