bbopt / nomad

NOMAD - A blackbox optimization software
https://nomad-4-user-guide.readthedocs.io/
GNU Lesser General Public License v3.0
110 stars 24 forks source link

restart multi obj #133

Open wgyang opened 1 year ago

wgyang commented 1 year ago

I tried to make a bi-obj optimization start from the previous state when the process was interrupted instead of starting from the beginning. Following the tutorial, I added the following to the parameter input file:

CACHE_FILE cache.txt HOT_RESTART_ON_USER_INTERRUPT true HOT_RESTART_READ_FILES true HOT_RESTART_WRITE_FILES true HOT_RESTART_FILE hotrestart.txt

But DMULTIMADS couldn't restart from the previous iteration when I killed the optimization. Similarly, when I ran bi-obj again without changing my param.txt, it made another MAX_BB_EVAL black box runs instead of being stopped at the beginning due to reaching max bb runs. For a single obj, the parameters above can make NOMAD read the hot restart file first. The example problems I tested were taken from nomad/examples/basic/batch/multi_obj/param.txt and /basic/batch/examples1/param.txt.

Thank you for your help!

ctribes commented 1 year ago

Hot restart is not yet implemented for DMultiMads. I have added a warning message (instead of an exception) whenever user wants to stop before restart.

Thanks for reporting this

wgyang commented 1 year ago

Thanks for your response. I am wondering if there is any other bi-obj algorithm in NOMAD that allows me to restart an interrupted process because my function evaluations are expensive and my optimization job that couples NOMAD to a CFD solver is run on a cluster with a wall time limit. Thanks!

ctribes commented 1 year ago

There is no other bi-objective algorithm in Nomad 4.

I suggest to save all evaluations in a cache file and/or history file (see user guide for details).

When saved in a cache files, evaluation points will be considered when re-launching Nomad on the same problem.