def run_hartmann6_benchmarks()

in benchmarks/run_ebo_benchmarks.py [0:0]


def run_hartmann6_benchmarks(D, rep):
    if D == 100:
        problem = hartmann6_100
    elif D == 1000:
        problem = hartmann6_1000

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

    options = {
        'x_range': np.vstack((np.zeros(D), np.ones(D))),
        'dx': D,
        'max_value': 3.32237,  # Let it cheat and know the true max value
        'T': 200,
        'gp_sigma': 1e-7,
    }
    options.update(core_options)

    f_max = lambda x: -f(x)  # since EBO maximizes

    e = ebo(f_max, options)
    try:
        e.run()
    except ValueError:
        pass  # EBO can ask for more than T function evaluations

    with open(f'results/hartmann6_{D}_ebo_rep_{rep}.json', "w") as fout:
       json.dump(object_to_json(experiment), fout)