We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 51b70cd commit 2b84333Copy full SHA for 2b84333
pymc3/backends/report.py
@@ -99,7 +99,14 @@ def raise_ok(self, level='error'):
99
if errors:
100
raise ValueError('Serious convergence issues during sampling.')
101
102
- def _run_convergence_checks(self, idata:arviz.InferenceData, model):
+ def _run_convergence_checks(self, idata: arviz.InferenceData, model):
103
+ if not hasattr(idata, 'posterior'):
104
+ msg = "No posterior samples. Unable to run convergence checks"
105
+ warn = SamplerWarning(WarningType.BAD_PARAMS, msg, 'info',
106
+ None, None, None)
107
+ self._add_warnings([warn])
108
+ return
109
+
110
if idata.posterior.sizes['chain'] == 1:
111
msg = ("Only one chain was sampled, this makes it impossible to "
112
"run some convergence checks")
0 commit comments