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

Dubug pickle error #1377

Closed
wants to merge 16 commits into from
Closed

Dubug pickle error #1377

wants to merge 16 commits into from

Conversation

manuelgloeckler
Copy link
Contributor

No description provided.

Copy link

codecov bot commented Jan 28, 2025

Codecov Report

Attention: Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.

Project coverage is 26.38%. Comparing base (d3f22b5) to head (27cb6ab).
Report is 14 commits behind head on main.

Files with missing lines Patch % Lines
sbi/utils/restriction_estimator.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1377       +/-   ##
===========================================
- Coverage   89.40%   26.38%   -63.03%     
===========================================
  Files         118      119        +1     
  Lines        8715     8786       +71     
===========================================
- Hits         7792     2318     -5474     
- Misses        923     6468     +5545     
Flag Coverage Δ
unittests 26.38% <92.85%> (-63.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
sbi/inference/posteriors/score_posterior.py 32.83% <100.00%> (-64.09%) ⬇️
sbi/inference/posteriors/vi_posterior.py 23.03% <100.00%> (-68.95%) ⬇️
sbi/inference/potentials/score_based_potential.py 28.78% <100.00%> (-68.23%) ⬇️
sbi/samplers/rejection/__init__.py 100.00% <100.00%> (ø)
sbi/samplers/score/__init__.py 100.00% <100.00%> (ø)
sbi/samplers/score/diffuser.py 28.30% <100.00%> (ø)
sbi/samplers/score/predictors.py 53.84% <ø> (-43.66%) ⬇️
sbi/samplers/vi/__init__.py 100.00% <ø> (ø)
sbi/samplers/vi/vi_divergence_optimizers.py 22.77% <ø> (-64.40%) ⬇️
sbi/utils/restriction_estimator.py 16.91% <50.00%> (-67.99%) ⬇️

... and 87 files with indirect coverage changes

@manuelgloeckler
Copy link
Contributor Author

Can locally reproduce it using:

pytest -v -x -n auto -m "not slow and not gpu" --cov=sbi --cov-report=xml  tests/circular_import_test.py tests/mcmc_test.py::test_c2st_slice_np_vectorized_parallelized_on_Gaussian

Weirdly enough, the order matters i.e. first executing the mcmc test and then the circular import test will just work fine...

@manuelgloeckler
Copy link
Contributor Author

Error source indeed is the reset environment for some reason

@manuelgloeckler
Copy link
Contributor Author

Okey lesson learned is to not mess with sys.modules as pickle use it and can be sensitive to any change (even if it is just removing an readding things)

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