Skip to content

Specialised state saving interface #909

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
TorkelE opened this issue May 2, 2025 · 0 comments
Open

Specialised state saving interface #909

TorkelE opened this issue May 2, 2025 · 0 comments

Comments

@TorkelE
Copy link
Member

TorkelE commented May 2, 2025

If you wish to save things during an optimisation run (typically the loss trace, but sometimes other stuff as well) you can typically implement this during a callback and your own structure. Depending on situations this can be more or less messy.

However, it would be straightforward to have an argument to solve save_state(os::OptimizationState) -> u (potentially one would want to impose some conditions on u). Next, in each step (or every n steps), save_state is called on the optimisation state and saves the result to a vector (state_trajectory) which is saved as a field of the OptimizationSoltution.

By default, save_state would do nothing and state_trajectory would be nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant