Skip to content

Commit

Permalink
Return tune information from Slice sampler
Browse files Browse the repository at this point in the history
This avoids a crash when mixing slice sampling with another sampler that has `tune` stats
  • Loading branch information
ricardoV94 committed May 8, 2023
1 parent 9e91935 commit fee9a02
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pymc/step_methods/slicer.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class Slice(ArrayStep):
name = "slice"
default_blocked = False
stats_dtypes_shapes = {
"tune": (bool, []),
"nstep_out": (int, []),
"nstep_in": (int, []),
}
Expand Down Expand Up @@ -140,6 +141,7 @@ def astep(self, apoint: RaveledVars, *args) -> Tuple[RaveledVars, StatsType]:
self.n_tunes += 1

stats = {
"tune": self.tune,
"nstep_out": nstep_out,
"nstep_in": nstep_in,
}
Expand Down

0 comments on commit fee9a02

Please sign in to comment.