dynamicslab / pysindy

A package for the sparse identification of nonlinear dynamical systems from data
https://pysindy.readthedocs.io/en/latest/
Other
1.36k stars 304 forks source link

feat(optimizers): Enable pickling of MIOSR optimizer #458

Closed Jacob-Stevens-Haas closed 5 months ago

Jacob-Stevens-Haas commented 5 months ago

Provides a reference implementation of option 3 in #456 . At the time, I didn't know about __setstate__ and __getstate__, but these are simpler and more straightforwards than __reduce__.

Test fails on master, passes on this branch.

Most of this change is from the example here.

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (638e4bb) 93.87% compared to head (573d373) 93.89%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #458 +/- ## ========================================== + Coverage 93.87% 93.89% +0.01% ========================================== Files 37 37 Lines 3627 3634 +7 ========================================== + Hits 3405 3412 +7 Misses 222 222 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.