ModuleNotFoundError: No module named 'sbi.samplers.score'
Closed this issue · 3 comments
austintdaigle commented
Describe the bug
Hello, I just updated sbi to try out FMPE and NPSE. However, when I try to import FMPE or NPSE I get an error.
To Reproduce
- Python 3.12.5, SBI 0.23.0 (I double checked this ).
- Minimal code example:
pip install sbi
from sbi.inference import FMPE
- Error message:
Traceback (most recent call last):
File "/bottleneck_inference_fmpe.py", line 10, in
from sbi.inference import FMPE
File "/.conda/envs/sbi_2/lib/python3.12/site-packages/sbi/inference/init.py", line 2, in
from sbi.inference.trainers.base import (
File "/.conda/envs/sbi_2/lib/python3.12/site-packages/sbi/inference/trainers/base.py", line 22, in
from sbi.inference.posteriors.base_posterior import NeuralPosterior
File "/.conda/envs/sbi_2/lib/python3.12/site-packages/sbi/inference/posteriors/init.py", line 6, in
from sbi.inference.posteriors.score_posterior import ScorePosterior
File "/.conda/envs/sbi_2/lib/python3.12/site-packages/sbi/inference/posteriors/score_posterior.py", line 19, in
from sbi.samplers.score.correctors import Corrector
ModuleNotFoundError: No module named 'sbi.samplers.score'
Expected behavior
I attempted a fresh install of sbi which produced the same error. I would appreciate any help getting FMPE to work!
janfb commented
Thanks for reporting this, it seems the new release does not contain the score
folder. I will provide a fix in a moment.
janfb commented
The new release is out. If you uninstall sbi
and then install again to make sure to get the new version 23.1
, does it work then?
austintdaigle commented
Yes, thanks!