Skip to content

chore: prepare release#1718

Merged
janfb merged 17 commits intomainfrom
prepare-release
Apr 2, 2026
Merged

chore: prepare release#1718
janfb merged 17 commits intomainfrom
prepare-release

Conversation

@janfb
Copy link
Copy Markdown
Contributor

@janfb janfb commented Jan 7, 2026

  • draft changelog
  • bump version

TODO

  • GPU tests passing
  • slow tests passing
  • lock and env files updated.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 7, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.73%. Comparing base (c8fac87) to head (951d9b1).
⚠️ Report is 5 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
sbi/inference/potentials/vector_field_adaptor.py 40.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1718      +/-   ##
==========================================
- Coverage   88.01%   87.73%   -0.28%     
==========================================
  Files         140      140              
  Lines       12791    13258     +467     
==========================================
+ Hits        11258    11632     +374     
- Misses       1533     1626      +93     
Flag Coverage Δ
fast 82.75% <50.00%> (?)

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

Files with missing lines Coverage Δ
sbi/__version__.py 100.00% <100.00%> (ø)
sbi/utils/torchutils.py 68.11% <ø> (ø)
sbi/inference/potentials/vector_field_adaptor.py 88.72% <40.00%> (-0.62%) ⬇️

... and 1 file with indirect coverage changes

@manuelgloeckler
Copy link
Copy Markdown
Contributor

Hey @janfb ,

given due to the arviz release problem i.e. #1816. We should do the release soonish.

I think the only PR that we planned to include is #1752 (I can also have a closer look into that). The only larger bug fix #1803 will be merged soon.

Let me know if I can help on something i.e. running slow tests or so.

@janfb
Copy link
Copy Markdown
Contributor Author

janfb commented Mar 20, 2026

good point @manuelgloeckler !

Yes, running slow tests and gpu tests on your end would be great!

We should also include the

@manuelgloeckler
Copy link
Copy Markdown
Contributor

Hey, all right. Thanks!

I will do the GPU test + slow test. And post here.

@manuelgloeckler
Copy link
Copy Markdown
Contributor

For the slow tests locally on a Mac, they pass but I think we should remove some XFail:

SKIPPED [2] tests/lc2st_test.py:252: flaky due to evaluation error, will be fixed in #1727
XFAIL tests/inference_with_NaN_simulator_test.py::test_inference_with_nan_simulator[NLE_A-0.05]
XFAIL tests/inference_with_NaN_simulator_test.py::test_inference_with_nan_simulator[NRE_B-0.05]
XFAIL tests/embedding_net_test.py::test_npe_with_with_iid_embedding_varying_num_trials - Padding with NaNs causes error in new NaN check on x_o, see #1701, #1717
XFAIL tests/ensemble_test.py::test_c2st_posterior_ensemble_on_linearGaussian[NPE_C-5]
XFAIL tests/linearGaussian_vector_field_test.py::test_fmpe_shifted_data_c2st[None-False] - No z-scoring fails

@manuelgloeckler
Copy link
Copy Markdown
Contributor

manuelgloeckler commented Mar 26, 2026

There are two failures on GPU tests:

FAILED tests/inference_on_device_test.py::test_multiround_mdn_training_on_device[cpu-NPE_A] - ValueError: Posterior precision matrix is not positive definite. This is a known issue with SNPE-A when the proposal and density estimator don't align well. Try di...
FAILED tests/inference_on_device_test.py::test_multiround_mdn_training_on_device[gpu-NPE_A] - ValueError: Posterior precision matrix is not positive definite. This is a known issue with SNPE-A when the proposal and density estimator don't align well. Try di...

Which are however not related to the device nut is probably from the SNPE-A refactoring that changed the numerics.

I am not entirely sure why or where, but the device tests specifically inference_on_device_test.py are pretty slow (or got stuck for me). In this run only around 80% finished.

@janfb
Copy link
Copy Markdown
Contributor Author

janfb commented Mar 27, 2026

For the slow tests locally on a Mac, they pass but I think we should remove some XFail:

SKIPPED [2] tests/lc2st_test.py:252: flaky due to evaluation error, will be fixed in #1727
XFAIL tests/inference_with_NaN_simulator_test.py::test_inference_with_nan_simulator[NLE_A-0.05]
XFAIL tests/inference_with_NaN_simulator_test.py::test_inference_with_nan_simulator[NRE_B-0.05]
XFAIL tests/embedding_net_test.py::test_npe_with_with_iid_embedding_varying_num_trials - Padding with NaNs causes error in new NaN check on x_o, see #1701, #1717
XFAIL tests/ensemble_test.py::test_c2st_posterior_ensemble_on_linearGaussian[NPE_C-5]
XFAIL tests/linearGaussian_vector_field_test.py::test_fmpe_shifted_data_c2st[None-False] - No z-scoring fails
  • LC2ST: Is waiting for a review, but let's do this next release.
  • no z-scoring: this is on purpose, it should fail without z-scoring because data is shifted.

@janfb
Copy link
Copy Markdown
Contributor Author

janfb commented Mar 27, 2026

tests/inference_on_device_test.py::test_multiround_mdn_training_on_device

this is because num_sims and max_num_epochs were too small so that NPE-A couldn't train and the analytical correction is off. I pushed a fix.

@janfb
Copy link
Copy Markdown
Contributor Author

janfb commented Mar 27, 2026

Regarding the slow GPU tests: can you run it with a time out or with --durations=20 or so to check which tests are so slow? @manuelgloeckler

Update: there is a pytest-timeout plugin; I am running this now on my CUDA machine to find the hanging tests.

With a time out of 300sec I get:

XFAIL tests/inference_on_device_test.py::test_boxuniform_device_handling[cpu-gpu]
FAILED tests/inference_on_device_test.py::test_to_method_on_posteriors[direct-cpu] - Failed: Timeout (>300.0s) from pytest-timeout.
FAILED tests/inference_on_device_test.py::test_vector_field_methods_device_handling[NPSE-2-cpu-cpu] - Failed: Timeout (>300.0s) from pytest-timeout.
FAILED tests/inference_on_device_test.py::test_vector_field_methods_device_handling[NPSE-2-cpu-gpu] - Failed: Timeout (>300.0s) from pytest-timeout.
FAILED tests/mnle_test.py::test_mnle_on_device[cpu] - TypeError: MCMCPosterior.sample() got an unexpected keyword argument 'mcmc_method'
FAILED tests/mnle_test.py::test_mnle_on_device[gpu] - TypeError: MCMCPosterior.sample() got an unexpected keyword argument 'mcmc_method'

@janfb
Copy link
Copy Markdown
Contributor Author

janfb commented Mar 27, 2026

@manuelgloeckler the issues should be fixed now. can you test again to double check?

@janfb
Copy link
Copy Markdown
Contributor Author

janfb commented Mar 27, 2026

@manuelgloeckler the issues should be fixed now. can you test again to double check?

Done, all GPU tests are passing and are fast.

@janfb
Copy link
Copy Markdown
Contributor Author

janfb commented Mar 27, 2026

CI will fail until #1827 is merged into main and this branch is rebased.

Slow and GPU tests are passing ✅

What is missing is:

  • fully updated Changelog
  • FMPE / NPSE tutorial

@janfb janfb force-pushed the prepare-release branch from 473ca7d to aa395d2 Compare March 27, 2026 13:54
Copy link
Copy Markdown
Contributor

@manuelgloeckler manuelgloeckler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @janfb ! I updated the Changelog and should be up to date now (atleast to my knowledge).

So I think the only part missing is the notebooks?

@janfb
Copy link
Copy Markdown
Contributor Author

janfb commented Apr 1, 2026

Thanks @janfb ! I updated the Changelog and should be up to date now (atleast to my knowledge).

So I think the only part missing is the notebooks?

Yes, the VE notebooks and the notebook tests. I plan to do the VE notebooks today.

For the notebook tests, I will now run CD on this branch.

Can you review #1758 ? @manuelgloeckler

@manuelgloeckler
Copy link
Copy Markdown
Contributor

Alright #1758 is merged, now. Let me know if I should have a look on the notebook.

@janfb
Copy link
Copy Markdown
Contributor Author

janfb commented Apr 2, 2026

Alright #1758 is merged, now. Let me know if I should have a look on the notebook.

Great! Just pushed it, #1830.

@manuelgloeckler
Copy link
Copy Markdown
Contributor

Great, made a review. Looks pretty much good to go!

@janfb janfb merged commit 6846039 into main Apr 2, 2026
7 checks passed
@janfb janfb deleted the prepare-release branch April 2, 2026 19:08
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.

2 participants