Closed MolinAlexei closed 5 months ago
Did you install sbi
from pypi with pip install sbi
or from the most recent github version?
I did pip install git+https://github.com/sbi-dev/sbi.git
somewhere around one and a half weeks ago (sorry I don't have the exact date)
Okay, thanks, we will have a look!
Actually, one more question: You are loading the density estimator
with open("file_with_estimator.pkl", "rb") as handle:
density_estimator_SNLE = pickle.load(handle)
Did you create this density estimator under an older version of sbi
?
Yes, I did
I'm guessing that I probably need to create a density estimator with the new version to then use this feature ?
I okay, then that's the reason. We have changed the density_estimator
s in sbi
and you cannot use "old" density estimators under the newest sbi version (from github).
I recommend to install sbi from pypi with pip install sbi
.
Okay, thank you ! I did this install this way because I need to access the results of an embedding net in another test I'm doing (through learned_summary_stats = trained_estimator.embedding_net(x)
)
Ah, okay. Yes, unfortunately you will have to retrain the density estimator here.
I am running the following lines of code :
And I get the following error :
I have sbi version 0.22.0