Skip to content

Commit b43587d

Browse files
committed
Make variational error message consistent.
1 parent 1c761ff commit b43587d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

cmdstanpy/model.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,10 +1527,8 @@ def variational(
15271527
'current value is {}.'.format(grad_samples)
15281528
)
15291529
else:
1530-
msg = (
1531-
'Variational algorithm failed.\n '
1532-
'Console output:\n{}'.format(contents)
1533-
)
1530+
msg = 'Error during variational inference: {}'.format(
1531+
runset.get_err_msgs())
15341532
raise RuntimeError(msg)
15351533
# pylint: disable=invalid-name
15361534
vb = CmdStanVB(runset)

0 commit comments

Comments
 (0)