Skip to content
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

switch from pickle/dill to cloudpickle #4858

Merged
merged 8 commits into from
Jul 13, 2021
Merged

Conversation

Spaak
Copy link
Member

@Spaak Spaak commented Jul 13, 2021

Fixing #4856 and (hopefully) preventing future issues with serialization, parallel sampling, etc. This PR also removes the pickle_backend parameter from pm.sample.

@twiecki @michaelosthege

@codecov
Copy link

codecov bot commented Jul 13, 2021

Codecov Report

Merging #4858 (0f5578d) into main (a3ee747) will increase coverage by 0.03%.
The diff coverage is 90.90%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4858      +/-   ##
==========================================
+ Coverage   72.32%   72.36%   +0.03%     
==========================================
  Files          85       85              
  Lines       13884    13852      -32     
==========================================
- Hits        10042    10024      -18     
+ Misses       3842     3828      -14     
Impacted Files Coverage Δ
pymc3/distributions/distribution.py 68.48% <ø> (+3.68%) ⬆️
pymc3/util.py 64.24% <50.00%> (ø)
pymc3/parallel_sampling.py 87.20% <100.00%> (+0.49%) ⬆️
pymc3/sampling.py 85.67% <100.00%> (+0.01%) ⬆️
pymc3/step_methods/hmc/base_hmc.py 90.24% <0.00%> (-0.82%) ⬇️

@twiecki twiecki merged commit f296a5c into pymc-devs:main Jul 13, 2021
@twiecki
Copy link
Member

twiecki commented Jul 13, 2021

Great stuff!

ricardoV94 pushed a commit to ricardoV94/pymc that referenced this pull request Jul 15, 2021
* use cloudpickle for serialization

* add cloudpickle to requirements

* update tests for cloudpickle

* update release notes with cloudpickle

* update conda envs with cloudpickle

* remove special case serialization for DensityDist.logp

* add pickle import back in for pickle.PickleError

* remove strict error message check in test
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.

3 participants