Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix for #286
Ok, I'm still pretty confused why this happens. It seems that, after the mcmc chain is run,
.cleanup
is called here which then calls._reset()
, which sets theinit_params=None
, see here.However, after all this, transforms are performed on the samples. If
transforms=None
was specified, a transformation is automatically inferred, as explained here. However, this again sets up the kernel here, which requires init_params. It breaks because theinit_params
had been set toNone
.A fix is to set
transforms={}
. With this, transforms are not automatically inferred and everything works fine.--- Update ---
This is the exact commit that broke our code. After this change, if
kernel
is None, it still tries to runself.kernel.setup
, which will break.Should we report this as an issue to pyro?