Skip to content

Pickleable models - #26

Merged
InfinityMonkeyAtWork merged 2 commits into
mainfrom
pickleable-models
Apr 24, 2026
Merged

Pickleable models#26
InfinityMonkeyAtWork merged 2 commits into
mainfrom
pickleable-models

Conversation

@InfinityMonkeyAtWork

Copy link
Copy Markdown
Owner

necessary to enable parallelizing slice-by-slice fits and enabling MCMC with workers>1

Component.__getstate__/__setstate__ replaces the package module with
its dotted name; Model and Par __getstate__ null parent back-refs and
transient fit state to keep pickles bounded to a single Model (~6x
smaller) and avoid cyclic self-refs.

Enables copy.deepcopy(model), fixes latent lmfit.emcee(workers>1)
silent pickle error, and unblocks the planned slice-by-slice
ProcessPoolExecutor dispatch.
@InfinityMonkeyAtWork
InfinityMonkeyAtWork merged commit 435c016 into main Apr 24, 2026
3 checks passed
@InfinityMonkeyAtWork
InfinityMonkeyAtWork deleted the pickleable-models branch April 24, 2026 22:59
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

Successfully merging this pull request may close these issues.

1 participant