numbbo / coco

Numerical Black-Box Optimization Benchmarking Framework
https://numbbo.github.io/coco
Other
254 stars 85 forks source link

How can I run experiments such that it takes less time for execution? #2263

Closed Yash-Pisat closed 4 months ago

Yash-Pisat commented 4 months ago

I am experimenting with a budget of 50 and 100 on all the functions in bbob test suite. It takes a lot of time with different solvers to run these experiments. Is there a way to maybe speed up the experiments I mean someway run the experiments parallely to save some time?

nikohansen commented 4 months ago

Yes, if you use this script

https://github.com/numbbo/coco/blob/master/code-experiments/build/python/example_experiment2.py

you can run the full experiment by launching any number of desired batches, each with a different batch=i/n argument where n must be the same in all cases, see the docstring of the script.

You can also steal the code logic, in essence

for batch_counter, problem in enumerate(suite):  # this loop may take hours or days...
    if batch_counter % batches != current_batch % batches:
        continue
    # [run solver on the problem]

Then, move (or copy) all batch result folders into a single new folder (as subfolders) and run the post-processing on this new folder.

Yash-Pisat commented 4 months ago

Great! I will try this out! Thankyou!