pints
pints copied to clipboard
Set something up so that optimisation/inference can be stopped and restarted
The ask-and-tell interface (#132) takes care of part of this, but it'd also be good to store the internal state of our optimisers/inferers to disk, perhaps using pickling ?
#TODO: Have a quick look at https://pythonhosted.org/joblib/
Meh
@martinjrobins @ben18785 please add Freya to this ticket if she decides to take it up :-)
Rough idea of how to implement it:
- write it as some kind of "deep copy" of every sampler/optimiser's state
- add bits to the ask-and-tell interface that allow the current state to be obtained, and a previous state object to be restored
- add a default implementation using copy.deepcopy
- but make sure that copy.deepcopy is not required !
- figure out what to do for wrapper methods i.e. cmaes
@MichaelClerx : points 3 and 4 seem contradictory, what do you mean that copy.deepcopy is not required, its part of the standard library isn't it?
Sorry, I meant that the interface shouldn't be written such that implementations require deepcopy. I.E. it should be possible to write a custom implementation instead
Via a different route I've hit on https://joblib.readthedocs.io/en/latest/ again :D