File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -154,17 +154,17 @@ def warn_treedepth(idata: arviz.InferenceData) -> List[SamplerWarning]:
154
154
if sampler_stats is None :
155
155
return []
156
156
157
- treedepth = sampler_stats .get ("tree_depth " , None )
158
- if treedepth is None :
157
+ rmtd = sampler_stats .get ("reached_max_treedepth " , None )
158
+ if rmtd is None :
159
159
return []
160
160
161
161
warnings = []
162
- for c in treedepth .chain :
163
- if sum (treedepth .sel (chain = c )) / treedepth .sizes ["draw" ] > 0.05 :
162
+ for c in rmtd .chain :
163
+ if sum (rmtd .sel (chain = c )) / rmtd .sizes ["draw" ] > 0.05 :
164
164
warnings .append (
165
165
SamplerWarning (
166
166
WarningType .TREEDEPTH ,
167
- f"Chain { c } reached the maximum tree depth."
167
+ f"Chain { int ( c ) } reached the maximum tree depth."
168
168
" Increase `max_treedepth`, increase `target_accept` or reparameterize." ,
169
169
"warn" ,
170
170
)
You can’t perform that action at this time.
0 commit comments