Hi all,
I am running Moco simulations, and sometimes the server crashes, or the IPOPT optimizer does not converge, etc. Regardless of the reasons, then Python is exited and I lose all variables, in particular my intermediate solution.
Is there any way to take a snapshot of my solution every few iterations and dump it in a sto file, like it is done with checkpoints in machine learning?
snapshot of solution every few iterations
- Pagnon David
- Posts: 86
- Joined: Mon Jan 06, 2014 3:13 am
- Nicholas Bianco
- Posts: 1003
- Joined: Thu Oct 04, 2012 8:09 pm
Re: snapshot of solution every few iterations
Hi Pagnon,
This is possible through CasADi's intermediate callback feature, but it's currently broken in Moco. We have an issue tracking the bug here: https://github.com/opensim-org/opensim-core/issues/3265.
In the meantime, you could always set the maximum iterations limit on your problem to get an "intermediate" solution for debugging. Not ideal, I know, but better than nothing.
Best,
Nick
This is possible through CasADi's intermediate callback feature, but it's currently broken in Moco. We have an issue tracking the bug here: https://github.com/opensim-org/opensim-core/issues/3265.
In the meantime, you could always set the maximum iterations limit on your problem to get an "intermediate" solution for debugging. Not ideal, I know, but better than nothing.
Best,
Nick
- Pagnon David
- Posts: 86
- Joined: Mon Jan 06, 2014 3:13 am
Re: snapshot of solution every few iterations
Well that's life! At least I know I can stop searching, and in the meantime I subscribed to the issue in order to be notified when it is fixed