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

Fix latest sample init strategy for snle and snre. #57

Merged
merged 2 commits into from
Jun 1, 2023

Conversation

janfb
Copy link
Contributor

@janfb janfb commented Jun 1, 2023

closes #56

after round 2, we are using the latest posterior samples from the previous round as inits for the current round.
The posterior._mcmc_init_params are set to the latest samples at the end of the sample method.
With the new sampler interface, however, we are creating a new posterior object at every iteration so that the latest samples are not set.
In this fix, we copy the posterior._mcmc_init_params from the proposal (posterior from previous round) to the newly created posterior of the current round.

Independent from #56 , I here also adapt to the new z-scoring api (separate commit).

@janfb janfb changed the title Fix sbi api Fix latest sample init strategy for snle and snre. Jun 1, 2023
@gisilvs
Copy link

gisilvs commented Jun 1, 2023

I have tested the changes and everything seems to work smoothly now, thanks!

@jan-matthis jan-matthis merged commit bd9f9f9 into sbi-benchmark:main Jun 1, 2023
@janfb janfb deleted the fix-sbi-api branch June 27, 2023 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

AttributeError: 'MCMCPosterior' object has no attribute '_mcmc_init_params'
3 participants