def run_hartmann6_benchmarks()

in benchmarks/run_turbo_benchmarks.py [0:0]


def run_hartmann6_benchmarks(D, rep, random_subspace=False):
    if D == 100:
        problem = hartmann6_100
    elif D == 1000 and not random_subspace:
        problem = hartmann6_1000
    elif D == 1000 and random_subspace:
        problem = hartmann6_random_subspace_1000

    experiment, f = benchmark_minimize_callable(
        problem=problem,
        num_trials=200,
        method_name='turbo',
        replication_index=rep,
    )

    turbo1 = turbo.Turbo1(
        f=f,
        lb=np.zeros(D),
        ub=np.ones(D),
        n_init=10,
        max_evals=200,
    )

    turbo1.optimize()

    rs_str = 'random_subspace_' if random_subspace else ''
    with open(f'results/hartmann6_{rs_str}{D}_turbo_rep_{rep}.json', "w") as fout:
       json.dump(object_to_json(experiment), fout)