Skip to content

Commit fee9a02

Browse files
committed
Return tune information from Slice sampler
This avoids a crash when mixing slice sampling with another sampler that has `tune` stats
1 parent 9e91935 commit fee9a02

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pymc/step_methods/slicer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ class Slice(ArrayStep):
5151
name = "slice"
5252
default_blocked = False
5353
stats_dtypes_shapes = {
54+
"tune": (bool, []),
5455
"nstep_out": (int, []),
5556
"nstep_in": (int, []),
5657
}
@@ -140,6 +141,7 @@ def astep(self, apoint: RaveledVars, *args) -> Tuple[RaveledVars, StatsType]:
140141
self.n_tunes += 1
141142

142143
stats = {
144+
"tune": self.tune,
143145
"nstep_out": nstep_out,
144146
"nstep_in": nstep_in,
145147
}

0 commit comments

Comments
 (0)