I am experimenting with Pygmo and find it very convenient for setting up global optimization tasks. However, it would be great to have more CPU cores (>32) which I do not have on my computer. I would like to keep everything as cost efficient as possible and thought about using either an AWS spot instance or a preemptive VM instance on a google cloud instance. Because the instance can be shutdown at any time, I need some warm start capability. I found a archipelago::save function in the API but do not understand if this function can be used to save the state of the optimizer. Is it possible to warm start Pygmo/Pagmo2 ?
All objects in pagmo can be serialized, the archipelago too. In python via pickle / dill, in c++ using the boost::serialization library. The method you found, i.e.
archipelago::save
implements the serialization of the object pagmo::archipelago following the API of the boost library.Something like this its the use of the serialization to restart the evolution. Note that
ss
can also be written and read from file.