We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 324d9e3 commit 496b090Copy full SHA for 496b090
1 file changed
cmdstanpy/model.py
@@ -1268,7 +1268,9 @@ def variational(
1268
transcript_file = runset.stdout_files[dummy_chain_id]
1269
with open(transcript_file, 'r') as transcript:
1270
contents = transcript.read()
1271
- pat = re.compile(r'stan::variational::normal_meanfield::calc_grad:', re.M)
+ pat = re.compile(
1272
+ r'stan::variational::normal_meanfield::calc_grad:', re.M
1273
+ )
1274
if len(re.findall(pat, contents)) > 0:
1275
if grad_samples is None:
1276
grad_samples = 10
@@ -1281,7 +1283,7 @@ def variational(
1281
1283
msg = (
1282
1284
'Variational algorithm failed.\n '
1285
'Console output:\n{}'.format(contents)
- )
1286
1287
raise RuntimeError(msg)
1288
# pylint: disable=invalid-name
1289
vb = CmdStanVB(runset)
0 commit comments