diff --git a/cmdstanpy/_version.py b/cmdstanpy/_version.py index cb8406c9..182815cd 100644 --- a/cmdstanpy/_version.py +++ b/cmdstanpy/_version.py @@ -1,3 +1,3 @@ """PyPi Version""" -__version__ = '1.0.7' +__version__ = '1.0.8' diff --git a/docs/_modules/cmdstanpy/cmdstan_args.html b/docs/_modules/cmdstanpy/cmdstan_args.html index c711184b..218fc744 100644 --- a/docs/_modules/cmdstanpy/cmdstan_args.html +++ b/docs/_modules/cmdstanpy/cmdstan_args.html @@ -5,7 +5,7 @@
-
history_size: Optional[int] = None,
) -> None:
- self.algorithm = algorithm
+ self.algorithm = algorithm or ""
self.init_alpha = init_alpha
self.iter = iter
self.save_iterations = save_iterations
@@ -583,10 +583,7 @@ Source code for cmdstanpy.cmdstan_args
"""
Check arguments correctness and consistency.
"""
- if (
- self.algorithm is not None
- and self.algorithm not in self.OPTIMIZE_ALGOS
- ):
+ if self.algorithm and self.algorithm not in self.OPTIMIZE_ALGOS:
raise ValueError(
'Please specify optimizer algorithms as one of [{}]'.format(
', '.join(self.OPTIMIZE_ALGOS)
@@ -594,9 +591,9 @@ Source code for cmdstanpy.cmdstan_args
)
if self.init_alpha is not None:
- if self.algorithm == 'Newton':
+ if self.algorithm.lower() not in {'lbfgs', 'bfgs'}:
raise ValueError(
- 'init_alpha must not be set when algorithm is Newton'
+ 'init_alpha requires that algorithm be set to bfgs or lbfgs'
)
if isinstance(self.init_alpha, float):
if self.init_alpha <= 0:
@@ -612,9 +609,9 @@ Source code for cmdstanpy.cmdstan_args
raise ValueError('iter must be type of int')
if self.tol_obj is not None:
- if self.algorithm == 'Newton':
+ if self.algorithm.lower() not in {'lbfgs', 'bfgs'}:
raise ValueError(
- 'tol_obj must not be set when algorithm is Newton'
+ 'tol_obj requires that algorithm be set to bfgs or lbfgs'
)
if isinstance(self.tol_obj, float):
if self.tol_obj <= 0:
@@ -623,9 +620,10 @@ Source code for cmdstanpy.cmdstan_args
raise ValueError('tol_obj must be type of float')
if self.tol_rel_obj is not None:
- if self.algorithm == 'Newton':
+ if self.algorithm.lower() not in {'lbfgs', 'bfgs'}:
raise ValueError(
- 'tol_rel_obj must not be set when algorithm is Newton'
+ 'tol_rel_obj requires that algorithm be set to bfgs'
+ ' or lbfgs'
)
if isinstance(self.tol_rel_obj, float):
if self.tol_rel_obj <= 0:
@@ -634,9 +632,9 @@ Source code for cmdstanpy.cmdstan_args
raise ValueError('tol_rel_obj must be type of float')
if self.tol_grad is not None:
- if self.algorithm == 'Newton':
+ if self.algorithm.lower() not in {'lbfgs', 'bfgs'}:
raise ValueError(
- 'tol_grad must not be set when algorithm is Newton'
+ 'tol_grad requires that algorithm be set to bfgs or lbfgs'
)
if isinstance(self.tol_grad, float):
if self.tol_grad <= 0:
@@ -645,9 +643,10 @@ Source code for cmdstanpy.cmdstan_args
raise ValueError('tol_grad must be type of float')
if self.tol_rel_grad is not None:
- if self.algorithm == 'Newton':
+ if self.algorithm.lower() not in {'lbfgs', 'bfgs'}:
raise ValueError(
- 'tol_rel_grad must not be set when algorithm is Newton'
+ 'tol_rel_grad requires that algorithm be set to bfgs'
+ ' or lbfgs'
)
if isinstance(self.tol_rel_grad, float):
if self.tol_rel_grad <= 0:
@@ -656,9 +655,9 @@ Source code for cmdstanpy.cmdstan_args
raise ValueError('tol_rel_grad must be type of float')
if self.tol_param is not None:
- if self.algorithm == 'Newton':
+ if self.algorithm.lower() not in {'lbfgs', 'bfgs'}:
raise ValueError(
- 'tol_param must not be set when algorithm is Newton'
+ 'tol_param requires that algorithm be set to bfgs or lbfgs'
)
if isinstance(self.tol_param, float):
if self.tol_param <= 0:
@@ -667,10 +666,9 @@ Source code for cmdstanpy.cmdstan_args
raise ValueError('tol_param must be type of float')
if self.history_size is not None:
- if self.algorithm == 'Newton' or self.algorithm == 'BFGS':
+ if self.algorithm.lower() != 'lbfgs':
raise ValueError(
- 'history_size must not be set when algorithm is '
- 'Newton or BFGS'
+ 'history_size requires that algorithm be set to lbfgs'
)
if isinstance(self.history_size, int):
if self.history_size < 0:
diff --git a/docs/_modules/cmdstanpy/compiler_opts.html b/docs/_modules/cmdstanpy/compiler_opts.html
index 0a7ba706..a2d8fb30 100644
--- a/docs/_modules/cmdstanpy/compiler_opts.html
+++ b/docs/_modules/cmdstanpy/compiler_opts.html
@@ -5,7 +5,7 @@
- cmdstanpy.compiler_opts — CmdStanPy 1.0.7 documentation
+ cmdstanpy.compiler_opts — CmdStanPy 1.0.8 documentation
@@ -56,7 +56,7 @@
diff --git a/docs/_modules/cmdstanpy/model.html b/docs/_modules/cmdstanpy/model.html
index 8c8304c4..23884cdb 100644
--- a/docs/_modules/cmdstanpy/model.html
+++ b/docs/_modules/cmdstanpy/model.html
@@ -5,7 +5,7 @@
- cmdstanpy.model — CmdStanPy 1.0.7 documentation
+ cmdstanpy.model — CmdStanPy 1.0.8 documentation
@@ -56,7 +56,7 @@
@@ -170,12 +170,14 @@ Source code for cmdstanpy.model
"""CmdStanModel"""
import io
+import json
import os
import platform
import re
import shutil
import subprocess
import sys
+import threading
from collections import OrderedDict
from concurrent.futures import ThreadPoolExecutor
from datetime import datetime
@@ -184,7 +186,6 @@ Source code for cmdstanpy.model
from pathlib import Path
from typing import Any, Callable, Dict, Iterable, List, Mapping, Optional, Union
-import ujson as json
from tqdm.auto import tqdm
from cmdstanpy import _CMDSTAN_REFRESH, _CMDSTAN_SAMPLING, _CMDSTAN_WARMUP
@@ -379,12 +380,6 @@ Source code for cmdstanpy.model
if compile and self._exe_file is None:
self.compile(force=str(compile).lower() == 'force')
- if self._exe_file is None:
- raise ValueError(
- 'Unable to compile Stan model file: {}.'.format(
- self._stan_file
- )
- )
def __repr__(self) -> str:
repr = 'CmdStanModel: name={}'.format(self._name)
@@ -648,9 +643,14 @@ Source code for cmdstanpy.model
self._compiler_options.add(compiler_options)
exe_target = os.path.splitext(self._stan_file)[0] + EXTENSION
if os.path.exists(exe_target):
- src_time = os.path.getmtime(self._stan_file)
exe_time = os.path.getmtime(exe_target)
- if exe_time > src_time and not force:
+ included_files = [self._stan_file]
+ included_files.extend(self.src_info().get('included_files', []))
+ out_of_date = any(
+ os.path.getmtime(included_file) > exe_time
+ for included_file in included_files
+ )
+ if not out_of_date and not force:
get_logger().debug('found newer exe file, not recompiling')
if self._exe_file is None: # called from constructor
self._exe_file = exe_target
@@ -700,45 +700,26 @@ Source code for cmdstanpy.model
get_logger().info(
'compiled model executable: %s', self._exe_file
)
- if compilation_failed or 'Warning' in console:
+ if 'Warning' in console:
lines = console.split('\n')
warnings = [x for x in lines if x.startswith('Warning')]
- syntax_errors = [
- x for x in lines if x.startswith('Syntax error')
- ]
- semantic_errors = [
- x for x in lines if x.startswith('Semantic error')
- ]
- exceptions = [
- x
- for x in lines
- if 'Uncaught exception' in x or 'fatal error' in x
- ]
- if (
- len(syntax_errors) > 0
- or len(semantic_errors) > 0
- or len(exceptions) > 0
- ):
- get_logger().error('Stan program failed to compile:')
- get_logger().warning(console)
- elif len(warnings) > 0:
- get_logger().warning(
- 'Stan compiler has produced %d warnings:',
- len(warnings),
- )
- get_logger().warning(console)
- elif (
- 'PCH file' in console
- or 'model_header.hpp.gch' in console
- or 'precompiled header' in console
- ):
+ get_logger().warning(
+ 'Stan compiler has produced %d warnings:',
+ len(warnings),
+ )
+ get_logger().warning(console)
+ if compilation_failed:
+ if 'PCH' in console or 'precompiled header' in console:
get_logger().warning(
"CmdStan's precompiled header (PCH) files "
"may need to be rebuilt."
- "If your model failed to compile please run "
- "cmdstanpy.rebuild_cmdstan().\nIf the "
- "issue persists please open a bug report"
- )
+ "Please run cmdstanpy.rebuild_cmdstan().\n"
+ "If the issue persists please open a bug report"
+ )
+ raise ValueError(
+ f"Failed to compile Stan model '{self._stan_file}'. "
+ f"Console:\n{console}"
+ )
[docs] def optimize(
self,
@@ -762,6 +743,7 @@ Source code for cmdstanpy.model
show_console: bool = False,
refresh: Optional[int] = None,
time_fmt: str = "%Y%m%d%H%M%S",
+ timeout: Optional[float] = None,
) -> CmdStanMLE:
"""
Run the specified CmdStan optimize algorithm to produce a
@@ -861,6 +843,8 @@ Source code for cmdstanpy.model
:meth:`~datetime.datetime.strftime` to decide the file names for
output CSVs. Defaults to "%Y%m%d%H%M%S"
+ :param timeout: Duration at which optimization times out in seconds.
+
:return: CmdStanMLE object
"""
optimize_args = OptimizeArgs(
@@ -892,10 +876,18 @@ Source code for cmdstanpy.model
)
dummy_chain_id = 0
runset = RunSet(args=args, chains=1, time_fmt=time_fmt)
- self._run_cmdstan(runset, dummy_chain_id, show_console=show_console)
+ self._run_cmdstan(
+ runset,
+ dummy_chain_id,
+ show_console=show_console,
+ timeout=timeout,
+ )
+ runset.raise_for_timeouts()
if not runset._check_retcodes():
- msg = 'Error during optimization: {}'.format(runset.get_err_msgs())
+ msg = "Error during optimization! Command '{}' failed: {}".format(
+ ' '.join(runset.cmd(0)), runset.get_err_msgs()
+ )
if 'Line search failed' in msg and not require_converged:
get_logger().warning(msg)
else:
@@ -936,6 +928,7 @@ Source code for cmdstanpy.model
show_console: bool = False,
refresh: Optional[int] = None,
time_fmt: str = "%Y%m%d%H%M%S",
+ timeout: Optional[float] = None,
*,
force_one_process_per_chain: Optional[bool] = None,
) -> CmdStanMCMC:
@@ -1133,6 +1126,8 @@ Source code for cmdstanpy.model
model was compiled with STAN_THREADS=True, and utilize the
parallel chain functionality if those conditions are met.
+ :param timeout: Duration at which sampling times out in seconds.
+
:return: CmdStanMCMC object
"""
if fixed_param is None:
@@ -1308,6 +1303,7 @@ Source code for cmdstanpy.model
show_progress=show_progress,
show_console=show_console,
progress_hook=progress_hook,
+ timeout=timeout,
)
if show_progress and progress_hook is not None:
progress_hook("Done", -1) # -1 == all chains finished
@@ -1323,6 +1319,8 @@ Source code for cmdstanpy.model
sys.stdout.write('\n')
get_logger().info('CmdStan done processing.')
+ runset.raise_for_timeouts()
+
get_logger().debug('runset\n%s', repr(runset))
# hack needed to parse CSV files if model has no params
@@ -1378,6 +1376,7 @@ Source code for cmdstanpy.model
show_console: bool = False,
refresh: Optional[int] = None,
time_fmt: str = "%Y%m%d%H%M%S",
+ timeout: Optional[float] = None,
) -> CmdStanGQ:
"""
Run CmdStan's generate_quantities method which runs the generated
@@ -1436,6 +1435,8 @@ Source code for cmdstanpy.model
:meth:`~datetime.datetime.strftime` to decide the file names for
output CSVs. Defaults to "%Y%m%d%H%M%S"
+ :param timeout: Duration at which generation times out in seconds.
+
:return: CmdStanGQ object
"""
if isinstance(mcmc_sample, CmdStanMCMC):
@@ -1498,8 +1499,10 @@ Source code for cmdstanpy.model
runset,
i,
show_console=show_console,
+ timeout=timeout,
)
+ runset.raise_for_timeouts()
errors = runset.get_err_msgs()
if errors:
msg = (
@@ -1535,6 +1538,7 @@ Source code for cmdstanpy.model
show_console: bool = False,
refresh: Optional[int] = None,
time_fmt: str = "%Y%m%d%H%M%S",
+ timeout: Optional[float] = None,
) -> CmdStanVB:
"""
Run CmdStan's variational inference algorithm to approximate
@@ -1627,6 +1631,9 @@ Source code for cmdstanpy.model
:meth:`~datetime.datetime.strftime` to decide the file names for
output CSVs. Defaults to "%Y%m%d%H%M%S"
+ :param timeout: Duration at which variational Bayesian inference times
+ out in seconds.
+
:return: CmdStanVB object
"""
variational_args = VariationalArgs(
@@ -1660,7 +1667,13 @@ Source code for cmdstanpy.model
dummy_chain_id = 0
runset = RunSet(args=args, chains=1, time_fmt=time_fmt)
- self._run_cmdstan(runset, dummy_chain_id, show_console=show_console)
+ self._run_cmdstan(
+ runset,
+ dummy_chain_id,
+ show_console=show_console,
+ timeout=timeout,
+ )
+ runset.raise_for_timeouts()
# treat failure to converge as failure
transcript_file = runset.stdout_files[dummy_chain_id]
@@ -1696,9 +1709,8 @@ Source code for cmdstanpy.model
'current value is {}.'.format(grad_samples)
)
else:
- msg = (
- 'Variational algorithm failed.\n '
- 'Console output:\n{}'.format(contents)
+ msg = 'Error during variational inference: {}'.format(
+ runset.get_err_msgs()
)
raise RuntimeError(msg)
# pylint: disable=invalid-name
@@ -1712,6 +1724,7 @@ Source code for cmdstanpy.model
show_progress: bool = False,
show_console: bool = False,
progress_hook: Optional[Callable[[str, int], None]] = None,
+ timeout: Optional[float] = None,
) -> None:
"""
Helper function which encapsulates call to CmdStan.
@@ -1748,6 +1761,21 @@ Source code for cmdstanpy.model
env=os.environ,
universal_newlines=True,
)
+ timer: Optional[threading.Timer]
+ if timeout:
+
+ def _timer_target() -> None:
+ # Abort if the process has already terminated.
+ if proc.poll() is not None:
+ return
+ proc.terminate()
+ runset._set_timeout_flag(idx, True)
+
+ timer = threading.Timer(timeout, _timer_target)
+ timer.daemon = True
+ timer.start()
+ else:
+ timer = None
while proc.poll() is None:
if proc.stdout is not None:
line = proc.stdout.readline()
@@ -1761,6 +1789,8 @@ Source code for cmdstanpy.model
stdout, _ = proc.communicate()
retcode = proc.returncode
runset._set_retcode(idx, retcode)
+ if timer:
+ timer.cancel()
if stdout:
fd_out.write(stdout)
diff --git a/docs/_modules/cmdstanpy/stanfit.html b/docs/_modules/cmdstanpy/stanfit.html
index a012160f..dc541799 100644
--- a/docs/_modules/cmdstanpy/stanfit.html
+++ b/docs/_modules/cmdstanpy/stanfit.html
@@ -5,7 +5,7 @@
- cmdstanpy.stanfit — CmdStanPy 1.0.7 documentation
+ cmdstanpy.stanfit — CmdStanPy 1.0.8 documentation
@@ -56,7 +56,7 @@
diff --git a/docs/_modules/cmdstanpy/stanfit/gq.html b/docs/_modules/cmdstanpy/stanfit/gq.html
index 08a9ff7c..5de8cfdf 100644
--- a/docs/_modules/cmdstanpy/stanfit/gq.html
+++ b/docs/_modules/cmdstanpy/stanfit/gq.html
@@ -5,7 +5,7 @@
- cmdstanpy.stanfit.gq — CmdStanPy 1.0.7 documentation
+ cmdstanpy.stanfit.gq — CmdStanPy 1.0.8 documentation
@@ -56,7 +56,7 @@
diff --git a/docs/_modules/cmdstanpy/stanfit/mcmc.html b/docs/_modules/cmdstanpy/stanfit/mcmc.html
index 8e4c0593..e6ce1266 100644
--- a/docs/_modules/cmdstanpy/stanfit/mcmc.html
+++ b/docs/_modules/cmdstanpy/stanfit/mcmc.html
@@ -5,7 +5,7 @@
- cmdstanpy.stanfit.mcmc — CmdStanPy 1.0.7 documentation
+ cmdstanpy.stanfit.mcmc — CmdStanPy 1.0.8 documentation
@@ -56,7 +56,7 @@
diff --git a/docs/_modules/cmdstanpy/stanfit/metadata.html b/docs/_modules/cmdstanpy/stanfit/metadata.html
index bf171b8b..5302dcc5 100644
--- a/docs/_modules/cmdstanpy/stanfit/metadata.html
+++ b/docs/_modules/cmdstanpy/stanfit/metadata.html
@@ -5,7 +5,7 @@
- cmdstanpy.stanfit.metadata — CmdStanPy 1.0.7 documentation
+ cmdstanpy.stanfit.metadata — CmdStanPy 1.0.8 documentation
@@ -56,7 +56,7 @@
diff --git a/docs/_modules/cmdstanpy/stanfit/mle.html b/docs/_modules/cmdstanpy/stanfit/mle.html
index 6d94f7ee..b5d9b682 100644
--- a/docs/_modules/cmdstanpy/stanfit/mle.html
+++ b/docs/_modules/cmdstanpy/stanfit/mle.html
@@ -5,7 +5,7 @@
- cmdstanpy.stanfit.mle — CmdStanPy 1.0.7 documentation
+ cmdstanpy.stanfit.mle — CmdStanPy 1.0.8 documentation
@@ -56,7 +56,7 @@
diff --git a/docs/_modules/cmdstanpy/stanfit/runset.html b/docs/_modules/cmdstanpy/stanfit/runset.html
index 68721c48..35c9019b 100644
--- a/docs/_modules/cmdstanpy/stanfit/runset.html
+++ b/docs/_modules/cmdstanpy/stanfit/runset.html
@@ -5,7 +5,7 @@
- cmdstanpy.stanfit.runset — CmdStanPy 1.0.7 documentation
+ cmdstanpy.stanfit.runset — CmdStanPy 1.0.8 documentation
@@ -56,7 +56,7 @@
@@ -213,6 +213,7 @@ Source code for cmdstanpy.stanfit.runset
else:
self._num_procs = 1
self._retcodes = [-1 for _ in range(self._num_procs)]
+ self._timeout_flags = [False for _ in range(self._num_procs)]
if chain_ids is None:
chain_ids = [i + 1 for i in range(chains)]
self._chain_ids = chain_ids
@@ -399,6 +400,10 @@ Source code for cmdstanpy.stanfit.runset
"""Set retcode at process[idx] to val."""
self._retcodes[idx] = val
+ def _set_timeout_flag(self, idx: int, val: bool) -> None:
+ """Set timeout_flag at process[idx] to val."""
+ self._timeout_flags[idx] = val
+
[docs] def get_err_msgs(self) -> str:
"""Checks console messages for each CmdStan run."""
msgs = []
@@ -462,7 +467,14 @@ Source code for cmdstanpy.stanfit.runset
except (IOError, OSError, PermissionError) as e:
raise ValueError(
'Cannot save to file: {}'.format(to_path)
- ) from e
+ ) from e
+
+ def raise_for_timeouts(self) -> None:
+ if any(self._timeout_flags):
+ raise TimeoutError(
+ f"{sum(self._timeout_flags)} of {self.num_procs} processes "
+ "timed out"
+ )
diff --git a/docs/_modules/cmdstanpy/stanfit/vb.html b/docs/_modules/cmdstanpy/stanfit/vb.html
index 0a0a265c..0f354697 100644
--- a/docs/_modules/cmdstanpy/stanfit/vb.html
+++ b/docs/_modules/cmdstanpy/stanfit/vb.html
@@ -5,7 +5,7 @@
- cmdstanpy.stanfit.vb — CmdStanPy 1.0.7 documentation
+ cmdstanpy.stanfit.vb — CmdStanPy 1.0.8 documentation
@@ -56,7 +56,7 @@
diff --git a/docs/_modules/cmdstanpy/utils.html b/docs/_modules/cmdstanpy/utils.html
index 11cd7f23..4a2b9550 100644
--- a/docs/_modules/cmdstanpy/utils.html
+++ b/docs/_modules/cmdstanpy/utils.html
@@ -5,7 +5,7 @@
- cmdstanpy.utils — CmdStanPy 1.0.7 documentation
+ cmdstanpy.utils — CmdStanPy 1.0.8 documentation
@@ -56,7 +56,7 @@
@@ -254,7 +254,7 @@ Source code for cmdstanpy.utils
except Exception:
deps_info.append(('cmdstan', 'NOT FOUND'))
- deps = ['cmdstanpy', 'pandas', 'xarray', 'tqdm', 'numpy', 'ujson']
+ deps = ['cmdstanpy', 'pandas', 'xarray', 'tqdm', 'numpy']
for module in deps:
try:
if module in sys.modules:
diff --git a/docs/_modules/cmdstanpy/utils/cmdstan.html b/docs/_modules/cmdstanpy/utils/cmdstan.html
index b6096524..5ee80990 100644
--- a/docs/_modules/cmdstanpy/utils/cmdstan.html
+++ b/docs/_modules/cmdstanpy/utils/cmdstan.html
@@ -5,7 +5,7 @@
- cmdstanpy.utils.cmdstan — CmdStanPy 1.0.7 documentation
+ cmdstanpy.utils.cmdstan — CmdStanPy 1.0.8 documentation
@@ -56,7 +56,7 @@
@@ -172,6 +172,7 @@ Source code for cmdstanpy.utils.cmdstan
"""
import os
import platform
+import subprocess
import sys
from collections import OrderedDict
from typing import Callable, Dict, Optional, Tuple, Union
@@ -186,6 +187,46 @@ Source code for cmdstanpy.utils.cmdstan
EXTENSION = '.exe' if platform.system() == 'Windows' else ''
+def determine_linux_arch() -> str:
+ machine = platform.machine()
+ arch = ""
+ if machine == "aarch64":
+ arch = "arm64"
+ elif machine == "armv7l":
+ # Telling armel and armhf apart is nontrivial
+ # c.f. https://forums.raspberrypi.com/viewtopic.php?t=20873
+ readelf = subprocess.run(
+ ["readelf", "-A", "/proc/self/exe"],
+ check=True,
+ stdout=subprocess.PIPE,
+ text=True,
+ )
+ if "Tag_ABI_VFP_args" in readelf.stdout:
+ arch = "armel"
+ else:
+ arch = "armhf"
+ elif machine == "mips64":
+ arch = "mips64el"
+ elif machine == "ppc64el":
+ arch = "ppc64le"
+ elif machine == "s390x":
+ arch = "s390x"
+ return arch
+
+
+def get_download_url(version: str) -> str:
+ arch = os.environ.get("CMDSTAN_ARCH", "")
+ if not arch and platform.system() == "Linux":
+ arch = determine_linux_arch()
+
+ if arch and arch.lower() != "false":
+ url_end = f'v{version}/cmdstan-{version}-linux-{arch}.tar.gz'
+ else:
+ url_end = f'v{version}/cmdstan-{version}.tar.gz'
+
+ return f'https://github.com/stan-dev/cmdstan/releases/download/{url_end}'
+
+
def validate_dir(install_dir: str) -> None:
"""Check that specified install directory exists, can write."""
if not os.path.exists(install_dir):
diff --git a/docs/_modules/cmdstanpy/utils/json.html b/docs/_modules/cmdstanpy/utils/json.html
index fb5cd55d..08f128c3 100644
--- a/docs/_modules/cmdstanpy/utils/json.html
+++ b/docs/_modules/cmdstanpy/utils/json.html
@@ -5,7 +5,7 @@
- cmdstanpy.utils.json — CmdStanPy 1.0.7 documentation
+ cmdstanpy.utils.json — CmdStanPy 1.0.8 documentation
@@ -56,7 +56,7 @@
@@ -171,30 +171,10 @@ Source code for cmdstanpy.utils.json
Utilities for writing Stan Json files
"""
import json
-import math
from collections.abc import Collection
-from typing import Any, List, Mapping, Union
+from typing import Any, List, Mapping
import numpy as np
-import ujson
-
-from .logging import get_logger
-
-
-def rewrite_inf_nan(
- data: Union[float, int, List[Any]]
-) -> Union[str, int, float, List[Any]]:
- """Replaces NaN and Infinity with string representations"""
- if isinstance(data, float):
- if math.isnan(data):
- return 'NaN'
- if math.isinf(data):
- return ('+' if data > 0 else '-') + 'inf'
- return data
- elif isinstance(data, list):
- return [rewrite_inf_nan(item) for item in data]
- else:
- return data
def serialize_complex(c: Any) -> List[float]:
@@ -225,7 +205,6 @@ Source code for cmdstanpy.utils.json
"""
data_out = {}
for key, val in data.items():
- handle_nan_inf = False
if val is not None:
if isinstance(val, (str, bytes)) or (
type(val).__module__ != 'numpy'
@@ -236,9 +215,9 @@ Source code for cmdstanpy.utils.json
+ f"write_stan_json for key '{key}'"
)
try:
- handle_nan_inf = not np.all(np.isfinite(val))
- except TypeError:
# handles cases like val == ['hello']
+ np.isfinite(val)
+ except TypeError:
# pylint: disable=raise-missing-from
raise ValueError(
"Invalid type provided to "
@@ -255,15 +234,8 @@ Source code for cmdstanpy.utils.json
else:
data_out[key] = val
- if handle_nan_inf:
- data_out[key] = rewrite_inf_nan(data_out[key])
-
with open(path, 'w') as fd:
- try:
- ujson.dump(data_out, fd)
- except TypeError as e:
- get_logger().debug(e)
- json.dump(data_out, fd, default=serialize_complex)
+ json.dump(data_out, fd, default=serialize_complex)
diff --git a/docs/_modules/index.html b/docs/_modules/index.html
index 56befbea..60d7cc28 100644
--- a/docs/_modules/index.html
+++ b/docs/_modules/index.html
@@ -5,7 +5,7 @@
- Overview: module code — CmdStanPy 1.0.7 documentation
+ Overview: module code — CmdStanPy 1.0.8 documentation
@@ -56,7 +56,7 @@
diff --git a/docs/_sources/changes.rst.txt b/docs/_sources/changes.rst.txt
index 68f2b558..3b1df4b8 100644
--- a/docs/_sources/changes.rst.txt
+++ b/docs/_sources/changes.rst.txt
@@ -7,7 +7,18 @@ What's New
For full changes, see the `Releases page `__ on GitHub.
-CmdStanPy 1.0.6
+CmdStanPy 1.0.8
+---------------
+
+- ``install_cmdstan`` now downloads the correct CmdStan for non-x86 Linux machines.
+- Improved reporting of errors during :meth:`~CmdStanModel.compile`.
+- Fixed some edge cases in mixing arguments of the :meth:`~CmdStanModel.optimize` function.
+- Fixed how ``NaN`` and infinite numbers were serialized to JSON.
+- Removed dependency on ``ujson``. For now, all JSON serialization is done with the Python standard library.
+- Added a ``timeout`` parameter to all model methods which can be used to terminate the CmdStan process after the specified time.
+- A model will now properly recompile if one of the `#include`-d files changed since it was last built.
+
+CmdStanPy 1.0.7
---------------
- Fixed an issue where complex number containers in Stan program outputs were not being read in properly by CmdStanPy. The output would have the correct shape, but the values would be mixed up.
diff --git a/docs/_sources/installation.rst.txt b/docs/_sources/installation.rst.txt
index 9059edc7..54e5c566 100644
--- a/docs/_sources/installation.rst.txt
+++ b/docs/_sources/installation.rst.txt
@@ -209,6 +209,17 @@ can be used to override these defaults:
install_cmdstan -d my_local_cmdstan -v 2.27.0
ls -F my_local_cmdstan
+Alternate Linux Architectures
+.............................
+
+CmdStan can be installed on Linux for the following non-x86 architectures:
+``arm64``, ``armel``, ``armhf``, ``mips64el``, ``ppc64el`` and ``s390x``.
+
+CmdStanPy will do its best to determine which of these is applicable for your
+machine when running ``install_cmdstan``. If the wrong choice is made, or if you
+need to manually override this, you can set the ``CMDSTAN_ARCH`` environment variable
+to one of the above options, or to "false" to use the standard x86 download.
+
DIY Installation
^^^^^^^^^^^^^^^^
diff --git a/docs/_sources/users-guide/examples/Run Generated Quantities.ipynb.txt b/docs/_sources/users-guide/examples/Run Generated Quantities.ipynb.txt
index 87cbd793..403befa2 100644
--- a/docs/_sources/users-guide/examples/Run Generated Quantities.ipynb.txt
+++ b/docs/_sources/users-guide/examples/Run Generated Quantities.ipynb.txt
@@ -2,6 +2,7 @@
"cells": [
{
"cell_type": "markdown",
+ "metadata": {},
"source": [
"# Generating new quantities of interest.\n",
"\n",
@@ -19,11 +20,11 @@
"- transform parameters for reporting\n",
"- apply full Bayesian decision theory\n",
"- calculate log likelihoods, deviances, etc. for model comparison"
- ],
- "metadata": {}
+ ]
},
{
"cell_type": "markdown",
+ "metadata": {},
"source": [
"## Example: add posterior predictive checks to `bernoulli.stan`\n",
"\n",
@@ -34,12 +35,13 @@
"We instantiate the model `bernoulli`,\n",
"as in the \"Hello World\" section\n",
"of the CmdStanPy [tutorial](https://github.com/stan-dev/cmdstanpy/blob/develop/cmdstanpy_tutorial.ipynb) notebook."
- ],
- "metadata": {}
+ ]
},
{
"cell_type": "code",
"execution_count": null,
+ "metadata": {},
+ "outputs": [],
"source": [
"import os\n",
"from cmdstanpy import cmdstan_path, CmdStanModel, CmdStanMCMC, CmdStanGQ\n",
@@ -51,153 +53,151 @@
"# instantiate, compile bernoulli model\n",
"model = CmdStanModel(stan_file=stan_file)\n",
"print(model.code())"
- ],
- "outputs": [],
- "metadata": {}
+ ]
},
{
"cell_type": "markdown",
+ "metadata": {},
"source": [
"The input data consists of `N` - the number of bernoulli trials and `y` - the list of observed outcomes.\n",
"Inspection of the data shows that on average, there is a 20% chance of success for any given Bernoulli trial."
- ],
- "metadata": {}
+ ]
},
{
"cell_type": "code",
"execution_count": null,
+ "metadata": {},
+ "outputs": [],
"source": [
"# examine bernoulli data\n",
- "import ujson\n",
+ "import json\n",
"import statistics\n",
"with open(data_file,'r') as fp:\n",
- " data_dict = ujson.load(fp)\n",
+ " data_dict = json.load(fp)\n",
"print(data_dict)\n",
"print('mean of y: {}'.format(statistics.mean(data_dict['y'])))"
- ],
- "outputs": [],
- "metadata": {}
+ ]
},
{
"cell_type": "markdown",
+ "metadata": {},
"source": [
"As in the \"Hello World\" tutorial, we produce a sample from the posterior of the model conditioned on the data:"
- ],
- "metadata": {}
+ ]
},
{
"cell_type": "code",
"execution_count": null,
+ "metadata": {},
+ "outputs": [],
"source": [
"# fit the model to the data\n",
"fit = model.sample(data=data_file)"
- ],
- "outputs": [],
- "metadata": {}
+ ]
},
{
"cell_type": "markdown",
+ "metadata": {},
"source": [
"The fitted model produces an estimate of `theta` - the chance of success"
- ],
- "metadata": {}
+ ]
},
{
"cell_type": "code",
"execution_count": null,
+ "metadata": {},
+ "outputs": [],
"source": [
"fit.summary()"
- ],
- "outputs": [],
- "metadata": {}
+ ]
},
{
"cell_type": "markdown",
+ "metadata": {},
"source": [
"To run a prior predictive check, we add a `generated quantities` block to the model, in which we generate a new data vector `y_rep` using the current estimate of theta. The resulting model is in file [bernoulli_ppc.stan](https://github.com/stan-dev/cmdstanpy/blob/master/test/data/bernoulli_ppc.stan)"
- ],
- "metadata": {}
+ ]
},
{
"cell_type": "code",
"execution_count": null,
+ "metadata": {},
+ "outputs": [],
"source": [
"model_ppc = CmdStanModel(stan_file='bernoulli_ppc.stan')\n",
"print(model_ppc.code())"
- ],
- "outputs": [],
- "metadata": {}
+ ]
},
{
"cell_type": "markdown",
+ "metadata": {},
"source": [
"We run the `generate_quantities` method on `bernoulli_ppc` using existing sample `fit` as input. The `generate_quantities` method takes the values of `theta` in the `fit` sample as the set of draws from the posterior used to generate the corresponsing `y_rep` quantities of interest.\n",
"\n",
"The arguments to the `generate_quantities` method are:\n",
" + `data` - the data used to fit the model\n",
" + `mcmc_sample` - either a `CmdStanMCMC` object or a list of stan-csv files\n"
- ],
- "metadata": {}
+ ]
},
{
"cell_type": "code",
"execution_count": null,
+ "metadata": {},
+ "outputs": [],
"source": [
"new_quantities = model_ppc.generate_quantities(data=data_file, mcmc_sample=fit)"
- ],
- "outputs": [],
- "metadata": {}
+ ]
},
{
"cell_type": "markdown",
+ "metadata": {},
"source": [
"The `generate_quantities` method returns a `CmdStanGQ` object which contains the values for all variables in the generated quantitites block of the program ``bernoulli_ppc.stan``. Unlike the output from the ``sample`` method, it doesn't contain any information on the joint log probability density, sampler state, or parameters or transformed parameter values.\n",
"\n",
"In this example, each draw consists of the N-length array of replicate of the `bernoulli` model's input variable `y`, which is an N-length array of Bernoulli outcomes."
- ],
- "metadata": {}
+ ]
},
{
"cell_type": "code",
"execution_count": null,
+ "metadata": {},
+ "outputs": [],
"source": [
"print(new_quantities.draws().shape, new_quantities.column_names)\n",
"for i in range(3):\n",
" print (new_quantities.draws()[i,:])"
- ],
- "outputs": [],
- "metadata": {}
+ ]
},
{
"cell_type": "markdown",
+ "metadata": {},
"source": [
"We can also use ``draws_pd(inc_sample=True)`` to get a pandas DataFrame which combines the input drawset with the generated quantities."
- ],
- "metadata": {}
+ ]
},
{
"cell_type": "code",
"execution_count": null,
+ "metadata": {},
+ "outputs": [],
"source": [
"sample_plus = new_quantities.draws_pd(inc_sample=True)\n",
"print(type(sample_plus),sample_plus.shape)\n",
"names = list(sample_plus.columns.values[7:18])\n",
"sample_plus.iloc[0:3, :]"
- ],
- "outputs": [],
- "metadata": {}
+ ]
},
{
"cell_type": "markdown",
+ "metadata": {},
"source": [
"For models as simple as the bernoulli models here, it would be trivial to re-run the sampler and generate a new sample which contains both the estimate of the parameters `theta` as well as `y_rep` values. For models which are difficult to fit, i.e., when producing a sample is computationally expensive, the `generate_quantities` method is preferred."
- ],
- "metadata": {}
+ ]
}
],
"metadata": {
"kernelspec": {
- "display_name": "Python 3",
+ "display_name": "Python 3.9.5 ('stan')",
"language": "python",
"name": "python3"
},
@@ -212,8 +212,13 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.5"
+ },
+ "vscode": {
+ "interpreter": {
+ "hash": "8765ce46b013071999fc1966b52035a7309a0da7551e066cc0f0fa23e83d4f60"
+ }
}
},
"nbformat": 4,
"nbformat_minor": 4
-}
\ No newline at end of file
+}
diff --git a/docs/_static/documentation_options.js b/docs/_static/documentation_options.js
index f3b2e8ff..0d1bbd87 100644
--- a/docs/_static/documentation_options.js
+++ b/docs/_static/documentation_options.js
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
- VERSION: '1.0.7',
+ VERSION: '1.0.8',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
BUILDER: 'html',
diff --git a/docs/api.html b/docs/api.html
index e52e6089..22bc1344 100644
--- a/docs/api.html
+++ b/docs/api.html
@@ -6,7 +6,7 @@
- API Reference — CmdStanPy 1.0.7 documentation
+ API Reference — CmdStanPy 1.0.8 documentation
@@ -59,7 +59,7 @@
@@ -423,7 +423,7 @@ CmdStanModel
-generate_quantities(data=None, mcmc_sample=None, seed=None, gq_output_dir=None, sig_figs=None, show_console=False, refresh=None, time_fmt='%Y%m%d%H%M%S')[source]#
+generate_quantities(data=None, mcmc_sample=None, seed=None, gq_output_dir=None, sig_figs=None, show_console=False, refresh=None, time_fmt='%Y%m%d%H%M%S', timeout=None)[source]#
Run CmdStanβs generate_quantities method which runs the generated
quantities block of a model given an existing sample.
This function takes a CmdStanMCMC
object and the dataset used
@@ -471,6 +471,7 @@
CmdStanModelstr) β A format string passed to
strftime()
to decide the file names for
output CSVs. Defaults to β%Y%m%d%H%M%Sβ
+
timeout (Optional[float]) β Duration at which generation times out in seconds.
Returns
@@ -484,7 +485,7 @@ CmdStanModel
-optimize(data=None, seed=None, inits=None, output_dir=None, sig_figs=None, save_profile=False, algorithm=None, init_alpha=None, tol_obj=None, tol_rel_obj=None, tol_grad=None, tol_rel_grad=None, tol_param=None, history_size=None, iter=None, save_iterations=False, require_converged=True, show_console=False, refresh=None, time_fmt='%Y%m%d%H%M%S')[source]#
+optimize(data=None, seed=None, inits=None, output_dir=None, sig_figs=None, save_profile=False, algorithm=None, init_alpha=None, tol_obj=None, tol_rel_obj=None, tol_grad=None, tol_rel_grad=None, tol_param=None, history_size=None, iter=None, save_iterations=False, require_converged=True, show_console=False, refresh=None, time_fmt='%Y%m%d%H%M%S', timeout=None)[source]#
Run the specified CmdStan optimize algorithm to produce a
penalized maximum likelihood estimate of the model parameters.
This function validates the specified configuration, composes a call to
@@ -563,6 +564,7 @@
CmdStanModelstr) β A format string passed to
strftime()
to decide the file names for
output CSVs. Defaults to β%Y%m%d%H%M%Sβ
+
timeout (Optional[float]) β Duration at which optimization times out in seconds.
Returns
@@ -576,7 +578,7 @@ CmdStanModel
-sample(data=None, chains=None, parallel_chains=None, threads_per_chain=None, seed=None, chain_ids=None, inits=None, iter_warmup=None, iter_sampling=None, save_warmup=False, thin=None, max_treedepth=None, metric=None, step_size=None, adapt_engaged=True, adapt_delta=None, adapt_init_phase=None, adapt_metric_window=None, adapt_step_size=None, fixed_param=False, output_dir=None, sig_figs=None, save_latent_dynamics=False, save_profile=False, show_progress=True, show_console=False, refresh=None, time_fmt='%Y%m%d%H%M%S', *, force_one_process_per_chain=None)[source]#
+sample(data=None, chains=None, parallel_chains=None, threads_per_chain=None, seed=None, chain_ids=None, inits=None, iter_warmup=None, iter_sampling=None, save_warmup=False, thin=None, max_treedepth=None, metric=None, step_size=None, adapt_engaged=True, adapt_delta=None, adapt_init_phase=None, adapt_metric_window=None, adapt_step_size=None, fixed_param=False, output_dir=None, sig_figs=None, save_latent_dynamics=False, save_profile=False, show_progress=True, show_console=False, refresh=None, time_fmt='%Y%m%d%H%M%S', timeout=None, *, force_one_process_per_chain=None)[source]#
Run or more chains of the NUTS-HMC sampler to produce a set of draws
from the posterior distribution of a model conditioned on some data.
This function validates the specified configuration, composes a call to
@@ -739,6 +741,7 @@
CmdStanModelOptional[float]) β Duration at which sampling times out in seconds.
Returns
@@ -765,7 +768,7 @@ CmdStanModel
-variational(data=None, seed=None, inits=None, output_dir=None, sig_figs=None, save_latent_dynamics=False, save_profile=False, algorithm=None, iter=None, grad_samples=None, elbo_samples=None, eta=None, adapt_engaged=True, adapt_iter=None, tol_rel_obj=None, eval_elbo=None, output_samples=None, require_converged=True, show_console=False, refresh=None, time_fmt='%Y%m%d%H%M%S')[source]#
+variational(data=None, seed=None, inits=None, output_dir=None, sig_figs=None, save_latent_dynamics=False, save_profile=False, algorithm=None, iter=None, grad_samples=None, elbo_samples=None, eta=None, adapt_engaged=True, adapt_iter=None, tol_rel_obj=None, eval_elbo=None, output_samples=None, require_converged=True, show_console=False, refresh=None, time_fmt='%Y%m%d%H%M%S', timeout=None)[source]#
Run CmdStanβs variational inference algorithm to approximate
the posterior distribution of the model conditioned on the data.
This function validates the specified configuration, composes a call to
@@ -834,6 +837,8 @@
CmdStanModelstr) β A format string passed to
strftime()
to decide the file names for
output CSVs. Defaults to β%Y%m%d%H%M%Sβ
+
timeout (Optional[float]) β Duration at which variational Bayesian inference times
+out in seconds.
Returns
@@ -976,7 +981,7 @@ CmdStanMCMCReturn type
-
+
@@ -999,7 +1004,7 @@ CmdStanMCMCReturn type
-
+
@@ -1133,7 +1138,7 @@ CmdStanMCMCpandas.DataFrame
Return type
-
+
@@ -1338,7 +1343,7 @@ CmdStanMLE
-property optimized_iterations_pd: Optional[pandas.core.frame.DataFrame]#
+property optimized_iterations_pd: Optional[pandas.core.frame.DataFrame]#
Returns all saved iterations from the optimizer and final estimate
as a pandas.DataFrame which contains all optimizer outputs, i.e.,
the value for lp__ as well as all Stan program variables.
@@ -1361,7 +1366,7 @@ CmdStanMLE
-property optimized_params_pd: pandas.core.frame.DataFrame#
+property optimized_params_pd: pandas.core.frame.DataFrame#
Returns all final estimates from the optimizer as a pandas.DataFrame
which contains all optimizer outputs, i.e., the value for lp__
as well as all Stan program variables.
@@ -1442,7 +1447,7 @@ CmdStanGQReturn type
-
+
@@ -1466,7 +1471,7 @@ CmdStanGQReturn type
-
+
@@ -1710,7 +1715,7 @@ CmdStanVB
-property variational_params_pd: pandas.core.frame.DataFrame#
+property variational_params_pd: pandas.core.frame.DataFrame#
Returns inferred parameter means as pandas DataFrame.
@@ -1896,7 +1901,7 @@ write_stan_jsonnumpy.asarray()
, e.g a
-pandas.Series
.
+pandas.Series
.
Produces a file compatible with the
Json Format for Cmdstan
@@ -1905,7 +1910,7 @@ write_stan_jsonstr) β File path for the created json. Will be overwritten if
already in existence.
data (Mapping[str, Any]) β A mapping from strings to values. This can be a dictionary
-or something more exotic like an xarray.Dataset
. This will be
+or something more exotic like an xarray.Dataset
. This will be
copied before type conversion, not modified
diff --git a/docs/changes.html b/docs/changes.html
index 1eab93fd..da9dcfbe 100644
--- a/docs/changes.html
+++ b/docs/changes.html
@@ -6,7 +6,7 @@
- Whatβs New — CmdStanPy 1.0.7 documentation
+ Whatβs New — CmdStanPy 1.0.8 documentation
@@ -59,7 +59,7 @@
@@ -168,12 +168,17 @@
@@ -561,7 +561,7 @@ Maximum Likelihood Estimation
('lp__', 'theta')
-OrderedDict([('lp__', -5.00402), ('theta', 0.200006)])
+OrderedDict([('lp__', -5.00402), ('theta', 0.200003)])
@@ -595,7 +595,7 @@ Maximum Likelihood Estimation\n",
" 0 \n",
" -5.00402 \n",
- " 0.200006 \n",
+ " 0.200003 \n",
" \n",
" \n",
"\n",
@@ -113,7 +113,7 @@
],
"text/plain": [
" lp__ theta\n",
- "0 -5.00402 0.200006"
+ "0 -5.00402 0.200003"
]
},
"execution_count": 1,
@@ -156,7 +156,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.9.13"
+ "version": "3.9.15"
}
},
"nbformat": 4,
diff --git a/docs/users-guide/examples/Run Generated Quantities.html b/docs/users-guide/examples/Run Generated Quantities.html
index d046d580..b4398314 100644
--- a/docs/users-guide/examples/Run Generated Quantities.html
+++ b/docs/users-guide/examples/Run Generated Quantities.html
@@ -6,7 +6,7 @@
- Generating new quantities of interest. — CmdStanPy 1.0.7 documentation
+ Generating new quantities of interest. — CmdStanPy 1.0.8 documentation
@@ -59,7 +59,7 @@
@@ -563,7 +563,7 @@ Example: add posterior predictive checks to
-/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/tqdm/auto.py:22: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
+/opt/hostedtoolcache/Python/3.9.15/x64/lib/python3.9/site-packages/tqdm/auto.py:22: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
from .autonotebook import tqdm as notebook_tqdm
@@ -592,10 +592,10 @@ Example: add posterior predictive checks to # examine bernoulli data
-import ujson
+import json
import statistics
with open(data_file,'r') as fp:
- data_dict = ujson.load(fp)
+ data_dict = json.load(fp)
print(data_dict)
print('mean of y: {}'.format(statistics.mean(data_dict['y'])))
@@ -625,7 +625,7 @@ Example: add posterior predictive checks to
-13:29:28 - cmdstanpy - INFO - CmdStan start processing
+13:59:43 - cmdstanpy - INFO - CmdStan start processing
chain 1 | | 00:00 Status
chain 2 | | 00:00 Status
@@ -652,7 +652,7 @@ Example: add posterior predictive checks to
-13:29:28 - cmdstanpy - INFO - CmdStan done processing.
+13:59:43 - cmdstanpy - INFO - CmdStan done processing.
@@ -709,27 +709,27 @@ Example: add posterior predictive checks to
-13:29:28 - cmdstanpy - INFO - compiling stan file /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/bernoulli_ppc.stan to exe file /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/bernoulli_ppc
-13:29:37 - cmdstanpy - INFO - compiled model executable: /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/bernoulli_ppc
+13:59:44 - cmdstanpy - INFO - compiling stan file /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/bernoulli_ppc.stan to exe file /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/bernoulli_ppc
+13:59:55 - cmdstanpy - INFO - compiled model executable: /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/bernoulli_ppc
@@ -795,14 +795,14 @@ Example: add posterior predictive checks to
-13:29:38 - cmdstanpy - INFO - Chain [1] start processing
-13:29:38 - cmdstanpy - INFO - Chain [1] done processing
-13:29:38 - cmdstanpy - INFO - Chain [2] start processing
-13:29:38 - cmdstanpy - INFO - Chain [2] done processing
-13:29:38 - cmdstanpy - INFO - Chain [3] start processing
-13:29:38 - cmdstanpy - INFO - Chain [3] done processing
-13:29:38 - cmdstanpy - INFO - Chain [4] start processing
-13:29:38 - cmdstanpy - INFO - Chain [4] done processing
+13:59:55 - cmdstanpy - INFO - Chain [1] start processing
+13:59:55 - cmdstanpy - INFO - Chain [1] done processing
+13:59:55 - cmdstanpy - INFO - Chain [2] start processing
+13:59:55 - cmdstanpy - INFO - Chain [2] done processing
+13:59:55 - cmdstanpy - INFO - Chain [3] start processing
+13:59:55 - cmdstanpy - INFO - Chain [3] done processing
+13:59:55 - cmdstanpy - INFO - Chain [4] start processing
+13:59:55 - cmdstanpy - INFO - Chain [4] done processing
The generate_quantities
method returns a CmdStanGQ
object which contains the values for all variables in the generated quantitites block of the program bernoulli_ppc.stan
. Unlike the output from the sample
method, it doesnβt contain any information on the joint log probability density, sampler state, or parameters or transformed parameter values.
@@ -823,18 +823,18 @@ Example: add posterior predictive checks to
(1000, 4, 10) ('y_rep[1]', 'y_rep[2]', 'y_rep[3]', 'y_rep[4]', 'y_rep[5]', 'y_rep[6]', 'y_rep[7]', 'y_rep[8]', 'y_rep[9]', 'y_rep[10]')
-[[1. 1. 1. 0. 1. 0. 0. 0. 0. 0.]
- [1. 1. 1. 0. 0. 0. 0. 0. 0. 0.]
- [1. 1. 1. 0. 0. 0. 0. 0. 0. 0.]
- [1. 1. 1. 0. 0. 0. 0. 0. 0. 0.]]
-[[1. 1. 1. 0. 0. 0. 1. 0. 1. 1.]
- [1. 0. 1. 0. 0. 0. 1. 0. 0. 0.]
- [1. 0. 1. 0. 0. 0. 0. 0. 0. 0.]
- [1. 1. 1. 0. 0. 0. 1. 0. 1. 1.]]
-[[0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
+[[0. 0. 1. 1. 0. 1. 0. 0. 0. 1.]
+ [0. 0. 1. 1. 0. 1. 0. 0. 0. 1.]
+ [0. 0. 1. 1. 0. 1. 0. 0. 0. 1.]
+ [0. 0. 1. 1. 0. 1. 0. 0. 0. 1.]]
+[[0. 1. 0. 0. 0. 0. 0. 0. 0. 0.]
+ [0. 1. 0. 0. 0. 0. 0. 0. 0. 0.]
+ [0. 1. 0. 0. 1. 1. 0. 1. 0. 0.]
+ [0. 1. 0. 1. 1. 1. 0. 1. 0. 0.]]
+[[1. 0. 0. 0. 0. 0. 0. 0. 0. 1.]
[0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
- [0. 0. 0. 1. 0. 0. 0. 0. 1. 0.]
- [0. 0. 0. 1. 0. 0. 0. 0. 1. 0.]]
+ [1. 0. 0. 0. 0. 1. 0. 0. 0. 1.]
+ [1. 0. 0. 0. 0. 1. 0. 0. 0. 1.]]
We can also use draws_pd(inc_sample=True)
to get a pandas DataFrame which combines the input drawset with the generated quantities.
@@ -903,15 +903,16 @@ Example: add posterior predictive checks to 0.0
0.0
0.0
- 0.0
- 0.0
+ 1.0
1
- -8.78559
- 1.000000
- 0.836793
- 1.0
+ -8.02517
+ 0.765605
+ 1.02377
1.0
+ 3.0
+ 0.0
+ 8.22072
+ 0.092059
0.0
- 9.52300
- 0.536282
- 1.0
- 1.0
1.0
0.0
0.0
0.0
- 1.0
0.0
- 1.0
- 1.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
2
- -8.59408
+ -7.26300
1.000000
- 0.836793
- 2.0
- 7.0
- 0.0
- 8.69180
- 0.071122
- 0.0
+ 1.02377
+ 1.0
+ 1.0
0.0
+ 7.89245
+ 0.139341
+ 1.0
0.0
0.0
0.0
@@ -963,6 +962,7 @@ Example: add posterior predictive checks to \n",
" \n",
" lp__ \n",
- " -7.281860 \n",
- " 0.020178 \n",
- " 0.750850 \n",
- " -8.966000 \n",
- " -6.980410 \n",
- " -6.749890 \n",
- " 1384.73 \n",
- " 32203.1 \n",
- " 1.00237 \n",
+ " -7.261840 \n",
+ " 0.019730 \n",
+ " 0.759061 \n",
+ " -8.799640 \n",
+ " -6.966800 \n",
+ " -6.750220 \n",
+ " 1480.07 \n",
+ " 25518.4 \n",
+ " 1.00197 \n",
" \n",
" \n",
" theta \n",
- " 0.251858 \n",
- " 0.003258 \n",
- " 0.121122 \n",
- " 0.074654 \n",
- " 0.238443 \n",
- " 0.473461 \n",
- " 1381.77 \n",
- " 32134.2 \n",
- " 1.00304 \n",
+ " 0.246352 \n",
+ " 0.002884 \n",
+ " 0.116454 \n",
+ " 0.077285 \n",
+ " 0.233223 \n",
+ " 0.459592 \n",
+ " 1630.56 \n",
+ " 28113.2 \n",
+ " 1.00198 \n",
" \n",
" \n",
"\n",
@@ -397,12 +397,12 @@
],
"text/plain": [
" Mean MCSE StdDev 5% 50% 95% N_Eff \\\n",
- "lp__ -7.281860 0.020178 0.750850 -8.966000 -6.980410 -6.749890 1384.73 \n",
- "theta 0.251858 0.003258 0.121122 0.074654 0.238443 0.473461 1381.77 \n",
+ "lp__ -7.261840 0.019730 0.759061 -8.799640 -6.966800 -6.750220 1480.07 \n",
+ "theta 0.246352 0.002884 0.116454 0.077285 0.233223 0.459592 1630.56 \n",
"\n",
" N_Eff/s R_hat \n",
- "lp__ 32203.1 1.00237 \n",
- "theta 32134.2 1.00304 "
+ "lp__ 25518.4 1.00197 \n",
+ "theta 28113.2 1.00198 "
]
},
"execution_count": 4,
@@ -426,10 +426,10 @@
"execution_count": 5,
"metadata": {
"execution": {
- "iopub.execute_input": "2022-08-25T13:29:28.322277Z",
- "iopub.status.busy": "2022-08-25T13:29:28.321772Z",
- "iopub.status.idle": "2022-08-25T13:29:37.996776Z",
- "shell.execute_reply": "2022-08-25T13:29:37.995958Z"
+ "iopub.execute_input": "2022-10-25T13:59:44.096799Z",
+ "iopub.status.busy": "2022-10-25T13:59:44.096293Z",
+ "iopub.status.idle": "2022-10-25T13:59:55.593277Z",
+ "shell.execute_reply": "2022-10-25T13:59:55.592237Z"
}
},
"outputs": [
@@ -437,14 +437,14 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "13:29:28 - cmdstanpy - INFO - compiling stan file /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/bernoulli_ppc.stan to exe file /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/bernoulli_ppc\n"
+ "13:59:44 - cmdstanpy - INFO - compiling stan file /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/bernoulli_ppc.stan to exe file /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/bernoulli_ppc\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
- "13:29:37 - cmdstanpy - INFO - compiled model executable: /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/bernoulli_ppc\n"
+ "13:59:55 - cmdstanpy - INFO - compiled model executable: /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/bernoulli_ppc\n"
]
},
{
@@ -494,10 +494,10 @@
"execution_count": 6,
"metadata": {
"execution": {
- "iopub.execute_input": "2022-08-25T13:29:38.001015Z",
- "iopub.status.busy": "2022-08-25T13:29:38.000298Z",
- "iopub.status.idle": "2022-08-25T13:29:38.114089Z",
- "shell.execute_reply": "2022-08-25T13:29:38.113297Z"
+ "iopub.execute_input": "2022-10-25T13:59:55.598269Z",
+ "iopub.status.busy": "2022-10-25T13:59:55.597938Z",
+ "iopub.status.idle": "2022-10-25T13:59:55.749138Z",
+ "shell.execute_reply": "2022-10-25T13:59:55.743423Z"
}
},
"outputs": [
@@ -505,56 +505,56 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "13:29:38 - cmdstanpy - INFO - Chain [1] start processing\n"
+ "13:59:55 - cmdstanpy - INFO - Chain [1] start processing\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
- "13:29:38 - cmdstanpy - INFO - Chain [1] done processing\n"
+ "13:59:55 - cmdstanpy - INFO - Chain [1] done processing\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
- "13:29:38 - cmdstanpy - INFO - Chain [2] start processing\n"
+ "13:59:55 - cmdstanpy - INFO - Chain [2] start processing\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
- "13:29:38 - cmdstanpy - INFO - Chain [2] done processing\n"
+ "13:59:55 - cmdstanpy - INFO - Chain [2] done processing\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
- "13:29:38 - cmdstanpy - INFO - Chain [3] start processing\n"
+ "13:59:55 - cmdstanpy - INFO - Chain [3] start processing\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
- "13:29:38 - cmdstanpy - INFO - Chain [3] done processing\n"
+ "13:59:55 - cmdstanpy - INFO - Chain [3] done processing\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
- "13:29:38 - cmdstanpy - INFO - Chain [4] start processing\n"
+ "13:59:55 - cmdstanpy - INFO - Chain [4] start processing\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
- "13:29:38 - cmdstanpy - INFO - Chain [4] done processing\n"
+ "13:59:55 - cmdstanpy - INFO - Chain [4] done processing\n"
]
}
],
@@ -576,10 +576,10 @@
"execution_count": 7,
"metadata": {
"execution": {
- "iopub.execute_input": "2022-08-25T13:29:38.118453Z",
- "iopub.status.busy": "2022-08-25T13:29:38.117860Z",
- "iopub.status.idle": "2022-08-25T13:29:38.144565Z",
- "shell.execute_reply": "2022-08-25T13:29:38.143726Z"
+ "iopub.execute_input": "2022-10-25T13:59:55.758291Z",
+ "iopub.status.busy": "2022-10-25T13:59:55.757900Z",
+ "iopub.status.idle": "2022-10-25T13:59:55.819842Z",
+ "shell.execute_reply": "2022-10-25T13:59:55.818315Z"
}
},
"outputs": [
@@ -588,18 +588,18 @@
"output_type": "stream",
"text": [
"(1000, 4, 10) ('y_rep[1]', 'y_rep[2]', 'y_rep[3]', 'y_rep[4]', 'y_rep[5]', 'y_rep[6]', 'y_rep[7]', 'y_rep[8]', 'y_rep[9]', 'y_rep[10]')\n",
- "[[1. 1. 1. 0. 1. 0. 0. 0. 0. 0.]\n",
- " [1. 1. 1. 0. 0. 0. 0. 0. 0. 0.]\n",
- " [1. 1. 1. 0. 0. 0. 0. 0. 0. 0.]\n",
- " [1. 1. 1. 0. 0. 0. 0. 0. 0. 0.]]\n",
- "[[1. 1. 1. 0. 0. 0. 1. 0. 1. 1.]\n",
- " [1. 0. 1. 0. 0. 0. 1. 0. 0. 0.]\n",
- " [1. 0. 1. 0. 0. 0. 0. 0. 0. 0.]\n",
- " [1. 1. 1. 0. 0. 0. 1. 0. 1. 1.]]\n",
- "[[0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]\n",
+ "[[0. 0. 1. 1. 0. 1. 0. 0. 0. 1.]\n",
+ " [0. 0. 1. 1. 0. 1. 0. 0. 0. 1.]\n",
+ " [0. 0. 1. 1. 0. 1. 0. 0. 0. 1.]\n",
+ " [0. 0. 1. 1. 0. 1. 0. 0. 0. 1.]]\n",
+ "[[0. 1. 0. 0. 0. 0. 0. 0. 0. 0.]\n",
+ " [0. 1. 0. 0. 0. 0. 0. 0. 0. 0.]\n",
+ " [0. 1. 0. 0. 1. 1. 0. 1. 0. 0.]\n",
+ " [0. 1. 0. 1. 1. 1. 0. 1. 0. 0.]]\n",
+ "[[1. 0. 0. 0. 0. 0. 0. 0. 0. 1.]\n",
" [0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]\n",
- " [0. 0. 0. 1. 0. 0. 0. 0. 1. 0.]\n",
- " [0. 0. 0. 1. 0. 0. 0. 0. 1. 0.]]\n"
+ " [1. 0. 0. 0. 0. 1. 0. 0. 0. 1.]\n",
+ " [1. 0. 0. 0. 0. 1. 0. 0. 0. 1.]]\n"
]
}
],
@@ -621,10 +621,10 @@
"execution_count": 8,
"metadata": {
"execution": {
- "iopub.execute_input": "2022-08-25T13:29:38.148105Z",
- "iopub.status.busy": "2022-08-25T13:29:38.147688Z",
- "iopub.status.idle": "2022-08-25T13:29:38.170916Z",
- "shell.execute_reply": "2022-08-25T13:29:38.170035Z"
+ "iopub.execute_input": "2022-10-25T13:59:55.824323Z",
+ "iopub.status.busy": "2022-10-25T13:59:55.823713Z",
+ "iopub.status.idle": "2022-10-25T13:59:55.869196Z",
+ "shell.execute_reply": "2022-10-25T13:59:55.868189Z"
}
},
"outputs": [
@@ -679,15 +679,16 @@
" \n",
" \n",
" 0 \n",
- " -9.13552 \n",
- " 0.940254 \n",
- " 0.836793 \n",
- " 1.0 \n",
- " 1.0 \n",
+ " -6.78689 \n",
+ " 0.983668 \n",
+ " 1.02377 \n",
+ " 2.0 \n",
+ " 3.0 \n",
+ " 0.0 \n",
+ " 7.21986 \n",
+ " 0.216274 \n",
+ " 0.0 \n",
" 0.0 \n",
- " 9.68264 \n",
- " 0.560479 \n",
- " 1.0 \n",
" 1.0 \n",
" 1.0 \n",
" 0.0 \n",
@@ -695,42 +696,40 @@
" 0.0 \n",
" 0.0 \n",
" 0.0 \n",
- " 0.0 \n",
- " 0.0 \n",
+ " 1.0 \n",
" \n",
" \n",
" 1 \n",
- " -8.78559 \n",
- " 1.000000 \n",
- " 0.836793 \n",
- " 1.0 \n",
+ " -8.02517 \n",
+ " 0.765605 \n",
+ " 1.02377 \n",
" 1.0 \n",
+ " 3.0 \n",
+ " 0.0 \n",
+ " 8.22072 \n",
+ " 0.092059 \n",
" 0.0 \n",
- " 9.52300 \n",
- " 0.536282 \n",
- " 1.0 \n",
- " 1.0 \n",
" 1.0 \n",
" 0.0 \n",
" 0.0 \n",
" 0.0 \n",
- " 1.0 \n",
" 0.0 \n",
- " 1.0 \n",
- " 1.0 \n",
+ " 0.0 \n",
+ " 0.0 \n",
+ " 0.0 \n",
+ " 0.0 \n",
" \n",
" \n",
" 2 \n",
- " -8.59408 \n",
+ " -7.26300 \n",
" 1.000000 \n",
- " 0.836793 \n",
- " 2.0 \n",
- " 7.0 \n",
- " 0.0 \n",
- " 8.69180 \n",
- " 0.071122 \n",
- " 0.0 \n",
+ " 1.02377 \n",
+ " 1.0 \n",
+ " 1.0 \n",
" 0.0 \n",
+ " 7.89245 \n",
+ " 0.139341 \n",
+ " 1.0 \n",
" 0.0 \n",
" 0.0 \n",
" 0.0 \n",
@@ -739,21 +738,22 @@
" 0.0 \n",
" 0.0 \n",
" 0.0 \n",
+ " 1.0 \n",
" \n",
" \n",
"\n",
""
],
"text/plain": [
- " 0 1 2 3 4 5 6 7 8 9 \\\n",
- "0 -9.13552 0.940254 0.836793 1.0 1.0 0.0 9.68264 0.560479 1.0 1.0 \n",
- "1 -8.78559 1.000000 0.836793 1.0 1.0 0.0 9.52300 0.536282 1.0 1.0 \n",
- "2 -8.59408 1.000000 0.836793 2.0 7.0 0.0 8.69180 0.071122 0.0 0.0 \n",
+ " 0 1 2 3 4 5 6 7 8 9 \\\n",
+ "0 -6.78689 0.983668 1.02377 2.0 3.0 0.0 7.21986 0.216274 0.0 0.0 \n",
+ "1 -8.02517 0.765605 1.02377 1.0 3.0 0.0 8.22072 0.092059 0.0 1.0 \n",
+ "2 -7.26300 1.000000 1.02377 1.0 1.0 0.0 7.89245 0.139341 1.0 0.0 \n",
"\n",
" 10 11 12 13 14 15 16 17 \n",
- "0 1.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 \n",
- "1 1.0 0.0 0.0 0.0 1.0 0.0 1.0 1.0 \n",
- "2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 "
+ "0 1.0 1.0 0.0 1.0 0.0 0.0 0.0 1.0 \n",
+ "1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 \n",
+ "2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 "
]
},
"execution_count": 8,
@@ -778,7 +778,7 @@
],
"metadata": {
"kernelspec": {
- "display_name": "Python 3",
+ "display_name": "Python 3.9.5 ('stan')",
"language": "python",
"name": "python3"
},
@@ -792,7 +792,12 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.9.13"
+ "version": "3.9.15"
+ },
+ "vscode": {
+ "interpreter": {
+ "hash": "8765ce46b013071999fc1966b52035a7309a0da7551e066cc0f0fa23e83d4f60"
+ }
}
},
"nbformat": 4,
diff --git a/docs/users-guide/examples/Using External C++.html b/docs/users-guide/examples/Using External C++.html
index 6ec6697e..1db59dd7 100644
--- a/docs/users-guide/examples/Using External C++.html
+++ b/docs/users-guide/examples/Using External C++.html
@@ -6,7 +6,7 @@
- Advanced Topic: Using External C++ Functions — CmdStanPy 1.0.7 documentation
+ Advanced Topic: Using External C++ Functions — CmdStanPy 1.0.8 documentation
@@ -59,7 +59,7 @@
diff --git a/docs/users-guide/examples/VI as Sampler Inits.html b/docs/users-guide/examples/VI as Sampler Inits.html
index 2a76626f..c161ace7 100644
--- a/docs/users-guide/examples/VI as Sampler Inits.html
+++ b/docs/users-guide/examples/VI as Sampler Inits.html
@@ -6,7 +6,7 @@
- Using Variational Estimates to Initialize the NUTS-HMC Sampler — CmdStanPy 1.0.7 documentation
+ Using Variational Estimates to Initialize the NUTS-HMC Sampler — CmdStanPy 1.0.8 documentation
@@ -59,7 +59,7 @@
@@ -554,10 +554,10 @@ Model and data
-/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/tqdm/auto.py:22: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
+/opt/hostedtoolcache/Python/3.9.15/x64/lib/python3.9/site-packages/tqdm/auto.py:22: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
from .autonotebook import tqdm as notebook_tqdm
-13:29:41 - cmdstanpy - INFO - compiling stan file /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/blr.stan to exe file /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/blr
-13:29:52 - cmdstanpy - INFO - compiled model executable: /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/blr
+13:59:59 - cmdstanpy - INFO - compiling stan file /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/blr.stan to exe file /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/blr
+14:00:14 - cmdstanpy - INFO - compiled model executable: /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/blr
@@ -603,9 +603,9 @@ Run Stanβs variational inference algorithm, obtain fitted estimates
-13:29:52 - cmdstanpy - INFO - Chain [1] start processing
-13:29:52 - cmdstanpy - INFO - Chain [1] done processing
-13:29:52 - cmdstanpy - WARNING - The algorithm may not have converged.
+14:00:14 - cmdstanpy - INFO - Chain [1] start processing
+14:00:14 - cmdstanpy - INFO - Chain [1] done processing
+14:00:14 - cmdstanpy - WARNING - The algorithm may not have converged.
Proceeding because require_converged is set to False
@@ -647,22 +647,22 @@ Run Stanβs variational inference algorithm, obtain fitted estimates
-13:29:52 - cmdstanpy - INFO - CmdStan start processing
+14:00:14 - cmdstanpy - INFO - CmdStan start processing
chain 1 | | 00:00 Status
chain 2 | | 00:00 Status
chain 3 | | 00:00 Status
-chain 4 | | 00:00 Status
-chain 1 |βββββββββ | 00:00 Iteration: 775 / 1075 [ 72%] (Sampling)
+chain 1 |βββββββ | 00:00 Iteration: 575 / 1075 [ 53%] (Sampling)
+chain 2 |βββββββ | 00:00 Iteration: 575 / 1075 [ 53%] (Sampling)
chain 3 |β | 00:00 Status
chain 4 |β | 00:00 Status
-chain 3 |βββββββββ | 00:00 Iteration: 775 / 1075 [ 72%] (Sampling)
+chain 3 |ββββββββ | 00:00 Iteration: 675 / 1075 [ 62%] (Sampling)
chain 1 |ββββββββββ| 00:00 Sampling completed
@@ -685,8 +685,8 @@ Run Stanβs variational inference algorithm, obtain fitted estimates
-13:29:53 - cmdstanpy - INFO - CmdStan done processing.
-13:29:53 - cmdstanpy - WARNING - Non-fatal error during sampling:
+14:00:14 - cmdstanpy - INFO - CmdStan done processing.
+14:00:14 - cmdstanpy - WARNING - Non-fatal error during sampling:
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/blr.stan', line 16, column 2 to column 45)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/blr.stan', line 16, column 2 to column 45)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/blr.stan', line 16, column 2 to column 45)
@@ -754,7 +754,7 @@ Run Stanβs variational inference algorithm, obtain fitted estimates-156.532000
-154.64600
938.42000
- 2035.620000
+ 1672.760000
1.001480
@@ -766,7 +766,7 @@ Run Stanβs variational inference algorithm, obtain fitted estimates0.999461
1.00107
4863.49000
- 10549.900000
+ 8669.320000
1.000320
@@ -778,7 +778,7 @@ Run Stanβs variational inference algorithm, obtain fitted estimates1.000210
1.00210
4344.92000
- 9424.990000
+ 7744.960000
0.999725
@@ -790,7 +790,7 @@ Run Stanβs variational inference algorithm, obtain fitted estimates1.000430
1.00200
4385.54000
- 9513.100000
+ 7817.360000
0.999669
@@ -802,7 +802,7 @@ Run Stanβs variational inference algorithm, obtain fitted estimates1.001150
1.00292
4664.71000
- 10118.700000
+ 8315.000000
0.999536
@@ -814,7 +814,7 @@ Run Stanβs variational inference algorithm, obtain fitted estimates1.001540
1.00321
4786.98000
- 10383.900000
+ 8532.940000
0.999197
@@ -826,7 +826,7 @@ Run Stanβs variational inference algorithm, obtain fitted estimates0.961783
1.09259
256.47117
- 556.336594
+ 457.167861
1.011019
@@ -847,7 +847,7 @@ Run Stanβs variational inference algorithm, obtain fitted estimates
-Processing csv files: /tmp/tmpyvkgpyxk/blrty52urby/blr-20220825132952_1.csv, /tmp/tmpyvkgpyxk/blrty52urby/blr-20220825132952_2.csv, /tmp/tmpyvkgpyxk/blrty52urby/blr-20220825132952_3.csv, /tmp/tmpyvkgpyxk/blrty52urby/blr-20220825132952_4.csv
+Processing csv files: /tmp/tmp0t3q4rnl/blrvg9rfjou/blr-20221025140014_1.csv, /tmp/tmp0t3q4rnl/blrvg9rfjou/blr-20221025140014_2.csv, /tmp/tmp0t3q4rnl/blrvg9rfjou/blr-20221025140014_3.csv, /tmp/tmp0t3q4rnl/blrvg9rfjou/blr-20221025140014_4.csv
Checking sampler transitions treedepth.
Treedepth satisfactory for all transitions.
@@ -880,7 +880,7 @@ Run Stanβs variational inference algorithm, obtain fitted estimates
-13:29:53 - cmdstanpy - INFO - CmdStan start processing
+14:00:14 - cmdstanpy - INFO - CmdStan start processing
chain 1 | | 00:00 Status
chain 2 | | 00:00 Status
@@ -888,7 +888,7 @@ Run Stanβs variational inference algorithm, obtain fitted estimates | 00:00 Status
-chain 2 |βββββββββ | 00:00 Iteration: 775 / 1075 [ 72%] (Sampling)
+chain 2 |ββββββ | 00:00 Iteration: 475 / 1075 [ 44%] (Sampling)
chain 1 |ββββββββββ| 00:00 Sampling completed
@@ -913,27 +913,20 @@ Run Stanβs variational inference algorithm, obtain fitted estimates
-13:29:53 - cmdstanpy - INFO - CmdStan done processing.
+14:00:15 - cmdstanpy - INFO - CmdStan done processing.
+14:00:15 - cmdstanpy - WARNING - Some chains may have failed to converge.
+ Chain 1 had 161 divergent transitions (16.1%)
+ Chain 3 had 147 divergent transitions (14.7%)
+ Chain 4 had 244 divergent transitions (24.4%)
+ Use function "diagnose()" to see further information.
-
+
-
-
-
-
-
-
-
-13:29:53 - cmdstanpy - WARNING - Some chains may have failed to converge.
- Chain 1 had 161 divergent transitions (16.1%)
- Chain 3 had 147 divergent transitions (14.7%)
- Chain 4 had 244 divergent transitions (24.4%)
- Use function "diagnose()" to see further information.
@@ -988,7 +981,7 @@ Run Stanβs variational inference algorithm, obtain fitted estimates-165.541000
-154.33900
2.03097
- 12.08910
+ 9.53509
11.37150
@@ -1000,7 +993,7 @@ Run Stanβs variational inference algorithm, obtain fitted estimates0.999494
1.00252
232.18100
- 1382.03000
+ 1090.05000
1.01286
@@ -1012,7 +1005,7 @@ Run Stanβs variational inference algorithm, obtain fitted estimates1.000410
1.00459
110.88200
- 660.01400
+ 520.57400
1.04571
@@ -1024,7 +1017,7 @@ Run Stanβs variational inference algorithm, obtain fitted estimates1.000480
1.00442
62.47110
- 371.85200
+ 293.29200
1.04607
@@ -1036,7 +1029,7 @@ Run Stanβs variational inference algorithm, obtain fitted estimates1.001690
1.00512
103.34500
- 615.14700
+ 485.18600
1.09049
@@ -1048,7 +1041,7 @@ Run Stanβs variational inference algorithm, obtain fitted estimates1.001290
1.00443
180.70500
- 1075.63000
+ 848.38100
1.03165
@@ -1060,7 +1053,7 @@ Run Stanβs variational inference algorithm, obtain fitted estimates2.708830
3.17346
2.03514
- 12.11393
+ 9.55465
10.50420
@@ -1080,7 +1073,7 @@ Run Stanβs variational inference algorithm, obtain fitted estimates
-Processing csv files: /tmp/tmpyvkgpyxk/blr2u04w073/blr-20220825132953_1.csv, /tmp/tmpyvkgpyxk/blr2u04w073/blr-20220825132953_2.csv, /tmp/tmpyvkgpyxk/blr2u04w073/blr-20220825132953_3.csv, /tmp/tmpyvkgpyxk/blr2u04w073/blr-20220825132953_4.csv
+Processing csv files: /tmp/tmp0t3q4rnl/blr549cam7k/blr-20221025140014_1.csv, /tmp/tmp0t3q4rnl/blr549cam7k/blr-20221025140014_2.csv, /tmp/tmp0t3q4rnl/blr549cam7k/blr-20221025140014_3.csv, /tmp/tmp0t3q4rnl/blr549cam7k/blr-20221025140014_4.csv
Checking sampler transitions treedepth.
Treedepth satisfactory for all transitions.
diff --git a/docs/users-guide/examples/VI as Sampler Inits.ipynb b/docs/users-guide/examples/VI as Sampler Inits.ipynb
index 8e85b05a..de91cb0d 100644
--- a/docs/users-guide/examples/VI as Sampler Inits.ipynb
+++ b/docs/users-guide/examples/VI as Sampler Inits.ipynb
@@ -26,10 +26,10 @@
"execution_count": 1,
"metadata": {
"execution": {
- "iopub.execute_input": "2022-08-25T13:29:41.587631Z",
- "iopub.status.busy": "2022-08-25T13:29:41.587309Z",
- "iopub.status.idle": "2022-08-25T13:29:52.713679Z",
- "shell.execute_reply": "2022-08-25T13:29:52.712928Z"
+ "iopub.execute_input": "2022-10-25T13:59:58.899187Z",
+ "iopub.status.busy": "2022-10-25T13:59:58.898601Z",
+ "iopub.status.idle": "2022-10-25T14:00:14.019616Z",
+ "shell.execute_reply": "2022-10-25T14:00:14.018504Z"
}
},
"outputs": [
@@ -37,7 +37,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/tqdm/auto.py:22: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
+ "/opt/hostedtoolcache/Python/3.9.15/x64/lib/python3.9/site-packages/tqdm/auto.py:22: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
" from .autonotebook import tqdm as notebook_tqdm\n"
]
},
@@ -45,14 +45,14 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "13:29:41 - cmdstanpy - INFO - compiling stan file /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/blr.stan to exe file /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/blr\n"
+ "13:59:59 - cmdstanpy - INFO - compiling stan file /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/blr.stan to exe file /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/blr\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
- "13:29:52 - cmdstanpy - INFO - compiled model executable: /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/blr\n"
+ "14:00:14 - cmdstanpy - INFO - compiled model executable: /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/blr\n"
]
},
{
@@ -108,10 +108,10 @@
"execution_count": 2,
"metadata": {
"execution": {
- "iopub.execute_input": "2022-08-25T13:29:52.718078Z",
- "iopub.status.busy": "2022-08-25T13:29:52.717630Z",
- "iopub.status.idle": "2022-08-25T13:29:52.820872Z",
- "shell.execute_reply": "2022-08-25T13:29:52.820138Z"
+ "iopub.execute_input": "2022-10-25T14:00:14.024801Z",
+ "iopub.status.busy": "2022-10-25T14:00:14.024476Z",
+ "iopub.status.idle": "2022-10-25T14:00:14.160076Z",
+ "shell.execute_reply": "2022-10-25T14:00:14.158979Z"
}
},
"outputs": [
@@ -119,21 +119,21 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "13:29:52 - cmdstanpy - INFO - Chain [1] start processing\n"
+ "14:00:14 - cmdstanpy - INFO - Chain [1] start processing\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
- "13:29:52 - cmdstanpy - INFO - Chain [1] done processing\n"
+ "14:00:14 - cmdstanpy - INFO - Chain [1] done processing\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
- "13:29:52 - cmdstanpy - WARNING - The algorithm may not have converged.\n",
+ "14:00:14 - cmdstanpy - WARNING - The algorithm may not have converged.\n",
"Proceeding because require_converged is set to False\n"
]
}
@@ -157,10 +157,10 @@
"execution_count": 3,
"metadata": {
"execution": {
- "iopub.execute_input": "2022-08-25T13:29:52.824561Z",
- "iopub.status.busy": "2022-08-25T13:29:52.824061Z",
- "iopub.status.idle": "2022-08-25T13:29:52.830029Z",
- "shell.execute_reply": "2022-08-25T13:29:52.829337Z"
+ "iopub.execute_input": "2022-10-25T14:00:14.164922Z",
+ "iopub.status.busy": "2022-10-25T14:00:14.164397Z",
+ "iopub.status.idle": "2022-10-25T14:00:14.170419Z",
+ "shell.execute_reply": "2022-10-25T14:00:14.169454Z"
}
},
"outputs": [
@@ -192,10 +192,10 @@
"execution_count": 4,
"metadata": {
"execution": {
- "iopub.execute_input": "2022-08-25T13:29:52.833146Z",
- "iopub.status.busy": "2022-08-25T13:29:52.832908Z",
- "iopub.status.idle": "2022-08-25T13:29:53.182640Z",
- "shell.execute_reply": "2022-08-25T13:29:53.181426Z"
+ "iopub.execute_input": "2022-10-25T14:00:14.176101Z",
+ "iopub.status.busy": "2022-10-25T14:00:14.175802Z",
+ "iopub.status.idle": "2022-10-25T14:00:14.596086Z",
+ "shell.execute_reply": "2022-10-25T14:00:14.594971Z"
}
},
"outputs": [
@@ -203,7 +203,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "13:29:52 - cmdstanpy - INFO - CmdStan start processing\n"
+ "14:00:14 - cmdstanpy - INFO - CmdStan start processing\n"
]
},
{
@@ -287,30 +287,30 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "\n"
+ "\r",
+ "chain 1 |\u001b[34mβββββββ \u001b[0m| 00:00 Iteration: 575 / 1075 [ 53%] (Sampling)"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
- "\r",
- "chain 2 |\u001b[34mββββββββ \u001b[0m| 00:00 Iteration: 675 / 1075 [ 62%] (Sampling)"
+ "\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
- "\u001b[A"
+ "\r",
+ "chain 2 |\u001b[34mβββββββ \u001b[0m| 00:00 Iteration: 575 / 1075 [ 53%] (Sampling)"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
- "\r",
- "chain 1 |\u001b[34mβββββββββ \u001b[0m| 00:00 Iteration: 775 / 1075 [ 72%] (Sampling)"
+ "\u001b[A"
]
},
{
@@ -373,7 +373,7 @@
"output_type": "stream",
"text": [
"\r",
- "chain 3 |\u001b[34mβββββββββ \u001b[0m| 00:00 Iteration: 775 / 1075 [ 72%] (Sampling)"
+ "chain 3 |\u001b[34mββββββββ \u001b[0m| 00:00 Iteration: 675 / 1075 [ 62%] (Sampling)"
]
},
{
@@ -397,7 +397,7 @@
"output_type": "stream",
"text": [
"\r",
- "chain 4 |\u001b[34mββββββββββ\u001b[0m| 00:00 Iteration: 875 / 1075 [ 81%] (Sampling)"
+ "chain 4 |\u001b[34mββββββββ \u001b[0m| 00:00 Iteration: 675 / 1075 [ 62%] (Sampling)"
]
},
{
@@ -475,14 +475,14 @@
"output_type": "stream",
"text": [
"\n",
- "13:29:53 - cmdstanpy - INFO - CmdStan done processing.\n"
+ "14:00:14 - cmdstanpy - INFO - CmdStan done processing.\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
- "13:29:53 - cmdstanpy - WARNING - Non-fatal error during sampling:\n",
+ "14:00:14 - cmdstanpy - WARNING - Non-fatal error during sampling:\n",
"Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/blr.stan', line 16, column 2 to column 45)\n",
"Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/blr.stan', line 16, column 2 to column 45)\n",
"Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/blr.stan', line 16, column 2 to column 45)\n",
@@ -510,10 +510,10 @@
"execution_count": 5,
"metadata": {
"execution": {
- "iopub.execute_input": "2022-08-25T13:29:53.186592Z",
- "iopub.status.busy": "2022-08-25T13:29:53.186110Z",
- "iopub.status.idle": "2022-08-25T13:29:53.283248Z",
- "shell.execute_reply": "2022-08-25T13:29:53.282370Z"
+ "iopub.execute_input": "2022-10-25T14:00:14.600214Z",
+ "iopub.status.busy": "2022-10-25T14:00:14.599895Z",
+ "iopub.status.idle": "2022-10-25T14:00:14.721935Z",
+ "shell.execute_reply": "2022-10-25T14:00:14.720920Z"
}
},
"outputs": [
@@ -559,7 +559,7 @@
" -156.532000 \n",
" -154.64600 \n",
" 938.42000 \n",
- " 2035.620000 \n",
+ " 1672.760000 \n",
" 1.001480 \n",
" \n",
" \n",
@@ -571,7 +571,7 @@
" 0.999461 \n",
" 1.00107 \n",
" 4863.49000 \n",
- " 10549.900000 \n",
+ " 8669.320000 \n",
" 1.000320 \n",
" \n",
" \n",
@@ -583,7 +583,7 @@
" 1.000210 \n",
" 1.00210 \n",
" 4344.92000 \n",
- " 9424.990000 \n",
+ " 7744.960000 \n",
" 0.999725 \n",
" \n",
" \n",
@@ -595,7 +595,7 @@
" 1.000430 \n",
" 1.00200 \n",
" 4385.54000 \n",
- " 9513.100000 \n",
+ " 7817.360000 \n",
" 0.999669 \n",
" \n",
" \n",
@@ -607,7 +607,7 @@
" 1.001150 \n",
" 1.00292 \n",
" 4664.71000 \n",
- " 10118.700000 \n",
+ " 8315.000000 \n",
" 0.999536 \n",
" \n",
" \n",
@@ -619,7 +619,7 @@
" 1.001540 \n",
" 1.00321 \n",
" 4786.98000 \n",
- " 10383.900000 \n",
+ " 8532.940000 \n",
" 0.999197 \n",
" \n",
" \n",
@@ -631,7 +631,7 @@
" 0.961783 \n",
" 1.09259 \n",
" 256.47117 \n",
- " 556.336594 \n",
+ " 457.167861 \n",
" 1.011019 \n",
" \n",
" \n",
@@ -648,14 +648,14 @@
"beta[5] 1.001540 0.000015 0.001033 0.999865 1.001540 1.00321 \n",
"sigma 0.963840 0.004465 0.071505 0.849600 0.961783 1.09259 \n",
"\n",
- " N_Eff N_Eff/s R_hat \n",
- "lp__ 938.42000 2035.620000 1.001480 \n",
- "beta[1] 4863.49000 10549.900000 1.000320 \n",
- "beta[2] 4344.92000 9424.990000 0.999725 \n",
- "beta[3] 4385.54000 9513.100000 0.999669 \n",
- "beta[4] 4664.71000 10118.700000 0.999536 \n",
- "beta[5] 4786.98000 10383.900000 0.999197 \n",
- "sigma 256.47117 556.336594 1.011019 "
+ " N_Eff N_Eff/s R_hat \n",
+ "lp__ 938.42000 1672.760000 1.001480 \n",
+ "beta[1] 4863.49000 8669.320000 1.000320 \n",
+ "beta[2] 4344.92000 7744.960000 0.999725 \n",
+ "beta[3] 4385.54000 7817.360000 0.999669 \n",
+ "beta[4] 4664.71000 8315.000000 0.999536 \n",
+ "beta[5] 4786.98000 8532.940000 0.999197 \n",
+ "sigma 256.47117 457.167861 1.011019 "
]
},
"execution_count": 5,
@@ -679,10 +679,10 @@
"execution_count": 6,
"metadata": {
"execution": {
- "iopub.execute_input": "2022-08-25T13:29:53.287418Z",
- "iopub.status.busy": "2022-08-25T13:29:53.286667Z",
- "iopub.status.idle": "2022-08-25T13:29:53.347367Z",
- "shell.execute_reply": "2022-08-25T13:29:53.346371Z"
+ "iopub.execute_input": "2022-10-25T14:00:14.726911Z",
+ "iopub.status.busy": "2022-10-25T14:00:14.726419Z",
+ "iopub.status.idle": "2022-10-25T14:00:14.804384Z",
+ "shell.execute_reply": "2022-10-25T14:00:14.803269Z"
}
},
"outputs": [
@@ -690,7 +690,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "Processing csv files: /tmp/tmpyvkgpyxk/blrty52urby/blr-20220825132952_1.csv, /tmp/tmpyvkgpyxk/blrty52urby/blr-20220825132952_2.csv, /tmp/tmpyvkgpyxk/blrty52urby/blr-20220825132952_3.csv, /tmp/tmpyvkgpyxk/blrty52urby/blr-20220825132952_4.csv\n",
+ "Processing csv files: /tmp/tmp0t3q4rnl/blrvg9rfjou/blr-20221025140014_1.csv, /tmp/tmp0t3q4rnl/blrvg9rfjou/blr-20221025140014_2.csv, /tmp/tmp0t3q4rnl/blrvg9rfjou/blr-20221025140014_3.csv, /tmp/tmp0t3q4rnl/blrvg9rfjou/blr-20221025140014_4.csv\n",
"\n",
"Checking sampler transitions treedepth.\n",
"Treedepth satisfactory for all transitions.\n",
@@ -726,10 +726,10 @@
"execution_count": 7,
"metadata": {
"execution": {
- "iopub.execute_input": "2022-08-25T13:29:53.351563Z",
- "iopub.status.busy": "2022-08-25T13:29:53.351229Z",
- "iopub.status.idle": "2022-08-25T13:29:53.552085Z",
- "shell.execute_reply": "2022-08-25T13:29:53.551207Z"
+ "iopub.execute_input": "2022-10-25T14:00:14.809039Z",
+ "iopub.status.busy": "2022-10-25T14:00:14.808604Z",
+ "iopub.status.idle": "2022-10-25T14:00:15.055994Z",
+ "shell.execute_reply": "2022-10-25T14:00:15.055049Z"
}
},
"outputs": [
@@ -737,7 +737,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "13:29:53 - cmdstanpy - INFO - CmdStan start processing\n"
+ "14:00:14 - cmdstanpy - INFO - CmdStan start processing\n"
]
},
{
@@ -829,7 +829,7 @@
"output_type": "stream",
"text": [
"\r",
- "chain 2 |\u001b[34mβββββββββ \u001b[0m| 00:00 Iteration: 775 / 1075 [ 72%] (Sampling)"
+ "chain 2 |\u001b[34mββββββ \u001b[0m| 00:00 Iteration: 475 / 1075 [ 44%] (Sampling)"
]
},
{
@@ -962,26 +962,26 @@
"output_type": "stream",
"text": [
"\n",
- "13:29:53 - cmdstanpy - INFO - CmdStan done processing.\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n"
+ "14:00:15 - cmdstanpy - INFO - CmdStan done processing.\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
- "13:29:53 - cmdstanpy - WARNING - Some chains may have failed to converge.\n",
+ "14:00:15 - cmdstanpy - WARNING - Some chains may have failed to converge.\n",
"\tChain 1 had 161 divergent transitions (16.1%)\n",
"\tChain 3 had 147 divergent transitions (14.7%)\n",
"\tChain 4 had 244 divergent transitions (24.4%)\n",
"\tUse function \"diagnose()\" to see further information.\n"
]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n"
+ ]
}
],
"source": [
@@ -993,10 +993,10 @@
"execution_count": 8,
"metadata": {
"execution": {
- "iopub.execute_input": "2022-08-25T13:29:53.555931Z",
- "iopub.status.busy": "2022-08-25T13:29:53.555455Z",
- "iopub.status.idle": "2022-08-25T13:29:53.644358Z",
- "shell.execute_reply": "2022-08-25T13:29:53.643482Z"
+ "iopub.execute_input": "2022-10-25T14:00:15.060517Z",
+ "iopub.status.busy": "2022-10-25T14:00:15.060151Z",
+ "iopub.status.idle": "2022-10-25T14:00:15.167408Z",
+ "shell.execute_reply": "2022-10-25T14:00:15.166338Z"
}
},
"outputs": [
@@ -1042,7 +1042,7 @@
" -165.541000 \n",
" -154.33900 \n",
" 2.03097 \n",
- " 12.08910 \n",
+ " 9.53509 \n",
" 11.37150 \n",
" \n",
" \n",
@@ -1054,7 +1054,7 @@
" 0.999494 \n",
" 1.00252 \n",
" 232.18100 \n",
- " 1382.03000 \n",
+ " 1090.05000 \n",
" 1.01286 \n",
" \n",
" \n",
@@ -1066,7 +1066,7 @@
" 1.000410 \n",
" 1.00459 \n",
" 110.88200 \n",
- " 660.01400 \n",
+ " 520.57400 \n",
" 1.04571 \n",
" \n",
" \n",
@@ -1078,7 +1078,7 @@
" 1.000480 \n",
" 1.00442 \n",
" 62.47110 \n",
- " 371.85200 \n",
+ " 293.29200 \n",
" 1.04607 \n",
" \n",
" \n",
@@ -1090,7 +1090,7 @@
" 1.001690 \n",
" 1.00512 \n",
" 103.34500 \n",
- " 615.14700 \n",
+ " 485.18600 \n",
" 1.09049 \n",
" \n",
" \n",
@@ -1102,7 +1102,7 @@
" 1.001290 \n",
" 1.00443 \n",
" 180.70500 \n",
- " 1075.63000 \n",
+ " 848.38100 \n",
" 1.03165 \n",
" \n",
" \n",
@@ -1114,7 +1114,7 @@
" 2.708830 \n",
" 3.17346 \n",
" 2.03514 \n",
- " 12.11393 \n",
+ " 9.55465 \n",
" 10.50420 \n",
" \n",
" \n",
@@ -1132,13 +1132,13 @@
"sigma 1.962000 0.725020 1.034300 0.907470 2.708830 3.17346 \n",
"\n",
" N_Eff N_Eff/s R_hat \n",
- "lp__ 2.03097 12.08910 11.37150 \n",
- "beta[1] 232.18100 1382.03000 1.01286 \n",
- "beta[2] 110.88200 660.01400 1.04571 \n",
- "beta[3] 62.47110 371.85200 1.04607 \n",
- "beta[4] 103.34500 615.14700 1.09049 \n",
- "beta[5] 180.70500 1075.63000 1.03165 \n",
- "sigma 2.03514 12.11393 10.50420 "
+ "lp__ 2.03097 9.53509 11.37150 \n",
+ "beta[1] 232.18100 1090.05000 1.01286 \n",
+ "beta[2] 110.88200 520.57400 1.04571 \n",
+ "beta[3] 62.47110 293.29200 1.04607 \n",
+ "beta[4] 103.34500 485.18600 1.09049 \n",
+ "beta[5] 180.70500 848.38100 1.03165 \n",
+ "sigma 2.03514 9.55465 10.50420 "
]
},
"execution_count": 8,
@@ -1155,10 +1155,10 @@
"execution_count": 9,
"metadata": {
"execution": {
- "iopub.execute_input": "2022-08-25T13:29:53.648058Z",
- "iopub.status.busy": "2022-08-25T13:29:53.647552Z",
- "iopub.status.idle": "2022-08-25T13:29:53.711136Z",
- "shell.execute_reply": "2022-08-25T13:29:53.710090Z"
+ "iopub.execute_input": "2022-10-25T14:00:15.172604Z",
+ "iopub.status.busy": "2022-10-25T14:00:15.172102Z",
+ "iopub.status.idle": "2022-10-25T14:00:15.247524Z",
+ "shell.execute_reply": "2022-10-25T14:00:15.246430Z"
}
},
"outputs": [
@@ -1166,7 +1166,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "Processing csv files: /tmp/tmpyvkgpyxk/blr2u04w073/blr-20220825132953_1.csv, /tmp/tmpyvkgpyxk/blr2u04w073/blr-20220825132953_2.csv, /tmp/tmpyvkgpyxk/blr2u04w073/blr-20220825132953_3.csv, /tmp/tmpyvkgpyxk/blr2u04w073/blr-20220825132953_4.csv\n",
+ "Processing csv files: /tmp/tmp0t3q4rnl/blr549cam7k/blr-20221025140014_1.csv, /tmp/tmp0t3q4rnl/blr549cam7k/blr-20221025140014_2.csv, /tmp/tmp0t3q4rnl/blr549cam7k/blr-20221025140014_3.csv, /tmp/tmp0t3q4rnl/blr549cam7k/blr-20221025140014_4.csv\n",
"\n",
"Checking sampler transitions treedepth.\n",
"Treedepth satisfactory for all transitions.\n",
@@ -1216,7 +1216,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.9.13"
+ "version": "3.9.15"
}
},
"nbformat": 4,
diff --git a/docs/users-guide/examples/Variational Inference.html b/docs/users-guide/examples/Variational Inference.html
index bc5f9f26..816fcc35 100644
--- a/docs/users-guide/examples/Variational Inference.html
+++ b/docs/users-guide/examples/Variational Inference.html
@@ -6,7 +6,7 @@
- Variational Inference in Stan — CmdStanPy 1.0.7 documentation
+ Variational Inference in Stan — CmdStanPy 1.0.8 documentation
@@ -59,7 +59,7 @@
@@ -556,10 +556,10 @@ Example: variational inference for model
-/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/tqdm/auto.py:22: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
+/opt/hostedtoolcache/Python/3.9.15/x64/lib/python3.9/site-packages/tqdm/auto.py:22: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
from .autonotebook import tqdm as notebook_tqdm
-13:29:56 - cmdstanpy - INFO - Chain [1] start processing
-13:29:56 - cmdstanpy - INFO - Chain [1] done processing
+14:00:17 - cmdstanpy - INFO - Chain [1] start processing
+14:00:17 - cmdstanpy - INFO - Chain [1] done processing
The class `CmdStanVB
<https://cmdstanpy.readthedocs.io/en/latest/api.html#stanvariational>`__ provides the following properties to access information about the parameter names, estimated means, and the sample: + column_names
+ variational_params_dict
+ variational_params_np
+ variational_params_pd
+ variational_sample
@@ -592,7 +592,7 @@ Example: variational inference for model
-0.230342
+0.227477
@@ -626,10 +626,10 @@ Example: variational inference for model
-13:29:56 - cmdstanpy - INFO - compiling stan file /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/eta_should_fail.stan to exe file /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/eta_should_fail
-13:30:08 - cmdstanpy - INFO - compiled model executable: /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/eta_should_fail
-13:30:08 - cmdstanpy - INFO - Chain [1] start processing
-13:30:08 - cmdstanpy - INFO - Chain [1] done processing
+14:00:17 - cmdstanpy - INFO - compiling stan file /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/eta_should_fail.stan to exe file /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/eta_should_fail
+14:00:33 - cmdstanpy - INFO - compiled model executable: /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/eta_should_fail
+14:00:33 - cmdstanpy - INFO - Chain [1] start processing
+14:00:33 - cmdstanpy - INFO - Chain [1] done processing
@@ -639,24 +639,24 @@ Example: variational inference for model
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
-Input In [5], in <cell line: 2>()
+Cell In [5], line 2
1 model_fail = CmdStanModel(stan_file='eta_should_fail.stan')
----> 2 vi_fail = model_fail.variational()
-File ~/work/cmdstanpy/cmdstanpy/cmdstanpy/model.py:1503, in CmdStanModel.variational(self, data, seed, inits, output_dir, sig_figs, save_latent_dynamics, save_profile, algorithm, iter, grad_samples, elbo_samples, eta, adapt_engaged, adapt_iter, tol_rel_obj, eval_elbo, output_samples, require_converged, show_console, refresh, time_fmt)
- 1501 if len(re.findall(pat, contents)) > 0:
- 1502 if require_converged:
--> 1503 raise RuntimeError(
- 1504 'The algorithm may not have converged.\n'
- 1505 'If you would like to inspect the output, '
- 1506 're-call with require_converged=False'
- 1507 )
- 1508 # else:
- 1509 get_logger().warning(
- 1510 '%s\n%s',
- 1511 'The algorithm may not have converged.',
- 1512 'Proceeding because require_converged is set to False',
- 1513 )
+File ~/work/cmdstanpy/cmdstanpy/cmdstanpy/model.py:1516, in CmdStanModel.variational(self, data, seed, inits, output_dir, sig_figs, save_latent_dynamics, save_profile, algorithm, iter, grad_samples, elbo_samples, eta, adapt_engaged, adapt_iter, tol_rel_obj, eval_elbo, output_samples, require_converged, show_console, refresh, time_fmt, timeout)
+ 1514 if len(re.findall(pat, contents)) > 0:
+ 1515 if require_converged:
+-> 1516 raise RuntimeError(
+ 1517 'The algorithm may not have converged.\n'
+ 1518 'If you would like to inspect the output, '
+ 1519 're-call with require_converged=False'
+ 1520 )
+ 1521 # else:
+ 1522 get_logger().warning(
+ 1523 '%s\n%s',
+ 1524 'The algorithm may not have converged.',
+ 1525 'Proceeding because require_converged is set to False',
+ 1526 )
RuntimeError: The algorithm may not have converged.
If you would like to inspect the output, re-call with require_converged=False
@@ -676,9 +676,9 @@ Example: variational inference for model
-13:30:08 - cmdstanpy - INFO - Chain [1] start processing
-13:30:09 - cmdstanpy - INFO - Chain [1] done processing
-13:30:09 - cmdstanpy - WARNING - The algorithm may not have converged.
+14:00:34 - cmdstanpy - INFO - Chain [1] start processing
+14:00:34 - cmdstanpy - INFO - Chain [1] done processing
+14:00:34 - cmdstanpy - WARNING - The algorithm may not have converged.
Proceeding because require_converged is set to False
@@ -700,8 +700,8 @@ Example: variational inference for model api docs
, section `CmdStanModel.variational
<https://cmdstanpy.readthedocs.io/en/latest/api.html#cmdstanpy.CmdStanModel.variational>`__ for a full description of all arguments.
diff --git a/docs/users-guide/examples/Variational Inference.ipynb b/docs/users-guide/examples/Variational Inference.ipynb
index 00077efb..8c75525a 100644
--- a/docs/users-guide/examples/Variational Inference.ipynb
+++ b/docs/users-guide/examples/Variational Inference.ipynb
@@ -42,10 +42,10 @@
"execution_count": 1,
"metadata": {
"execution": {
- "iopub.execute_input": "2022-08-25T13:29:55.906343Z",
- "iopub.status.busy": "2022-08-25T13:29:55.906042Z",
- "iopub.status.idle": "2022-08-25T13:29:56.328048Z",
- "shell.execute_reply": "2022-08-25T13:29:56.327167Z"
+ "iopub.execute_input": "2022-10-25T14:00:17.148135Z",
+ "iopub.status.busy": "2022-10-25T14:00:17.147378Z",
+ "iopub.status.idle": "2022-10-25T14:00:17.718528Z",
+ "shell.execute_reply": "2022-10-25T14:00:17.717455Z"
}
},
"outputs": [
@@ -53,7 +53,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/tqdm/auto.py:22: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
+ "/opt/hostedtoolcache/Python/3.9.15/x64/lib/python3.9/site-packages/tqdm/auto.py:22: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
" from .autonotebook import tqdm as notebook_tqdm\n"
]
},
@@ -61,14 +61,14 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "13:29:56 - cmdstanpy - INFO - Chain [1] start processing\n"
+ "14:00:17 - cmdstanpy - INFO - Chain [1] start processing\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
- "13:29:56 - cmdstanpy - INFO - Chain [1] done processing\n"
+ "14:00:17 - cmdstanpy - INFO - Chain [1] done processing\n"
]
}
],
@@ -103,10 +103,10 @@
"execution_count": 2,
"metadata": {
"execution": {
- "iopub.execute_input": "2022-08-25T13:29:56.332562Z",
- "iopub.status.busy": "2022-08-25T13:29:56.332190Z",
- "iopub.status.idle": "2022-08-25T13:29:56.336354Z",
- "shell.execute_reply": "2022-08-25T13:29:56.335826Z"
+ "iopub.execute_input": "2022-10-25T14:00:17.723482Z",
+ "iopub.status.busy": "2022-10-25T14:00:17.723159Z",
+ "iopub.status.idle": "2022-10-25T14:00:17.731121Z",
+ "shell.execute_reply": "2022-10-25T14:00:17.727527Z"
},
"scrolled": true
},
@@ -128,10 +128,10 @@
"execution_count": 3,
"metadata": {
"execution": {
- "iopub.execute_input": "2022-08-25T13:29:56.339498Z",
- "iopub.status.busy": "2022-08-25T13:29:56.339050Z",
- "iopub.status.idle": "2022-08-25T13:29:56.346480Z",
- "shell.execute_reply": "2022-08-25T13:29:56.345764Z"
+ "iopub.execute_input": "2022-10-25T14:00:17.734873Z",
+ "iopub.status.busy": "2022-10-25T14:00:17.734577Z",
+ "iopub.status.idle": "2022-10-25T14:00:17.739824Z",
+ "shell.execute_reply": "2022-10-25T14:00:17.738894Z"
}
},
"outputs": [
@@ -139,7 +139,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "0.230342\n"
+ "0.227477\n"
]
}
],
@@ -152,10 +152,10 @@
"execution_count": 4,
"metadata": {
"execution": {
- "iopub.execute_input": "2022-08-25T13:29:56.350086Z",
- "iopub.status.busy": "2022-08-25T13:29:56.349644Z",
- "iopub.status.idle": "2022-08-25T13:29:56.355335Z",
- "shell.execute_reply": "2022-08-25T13:29:56.354462Z"
+ "iopub.execute_input": "2022-10-25T14:00:17.744945Z",
+ "iopub.status.busy": "2022-10-25T14:00:17.744652Z",
+ "iopub.status.idle": "2022-10-25T14:00:17.749266Z",
+ "shell.execute_reply": "2022-10-25T14:00:17.748343Z"
}
},
"outputs": [
@@ -185,10 +185,10 @@
"execution_count": 5,
"metadata": {
"execution": {
- "iopub.execute_input": "2022-08-25T13:29:56.359861Z",
- "iopub.status.busy": "2022-08-25T13:29:56.359117Z",
- "iopub.status.idle": "2022-08-25T13:30:08.954269Z",
- "shell.execute_reply": "2022-08-25T13:30:08.953337Z"
+ "iopub.execute_input": "2022-10-25T14:00:17.754120Z",
+ "iopub.status.busy": "2022-10-25T14:00:17.753831Z",
+ "iopub.status.idle": "2022-10-25T14:00:34.056074Z",
+ "shell.execute_reply": "2022-10-25T14:00:34.055086Z"
},
"tags": [
"raises-exception"
@@ -199,28 +199,28 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "13:29:56 - cmdstanpy - INFO - compiling stan file /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/eta_should_fail.stan to exe file /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/eta_should_fail\n"
+ "14:00:17 - cmdstanpy - INFO - compiling stan file /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/eta_should_fail.stan to exe file /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/eta_should_fail\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
- "13:30:08 - cmdstanpy - INFO - compiled model executable: /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/eta_should_fail\n"
+ "14:00:33 - cmdstanpy - INFO - compiled model executable: /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/eta_should_fail\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
- "13:30:08 - cmdstanpy - INFO - Chain [1] start processing\n"
+ "14:00:33 - cmdstanpy - INFO - Chain [1] start processing\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
- "13:30:08 - cmdstanpy - INFO - Chain [1] done processing\n"
+ "14:00:33 - cmdstanpy - INFO - Chain [1] done processing\n"
]
},
{
@@ -230,8 +230,8 @@
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mRuntimeError\u001b[0m Traceback (most recent call last)",
- "Input \u001b[0;32mIn [5]\u001b[0m, in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m model_fail \u001b[38;5;241m=\u001b[39m CmdStanModel(stan_file\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124meta_should_fail.stan\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m----> 2\u001b[0m vi_fail \u001b[38;5;241m=\u001b[39m \u001b[43mmodel_fail\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mvariational\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n",
- "File \u001b[0;32m~/work/cmdstanpy/cmdstanpy/cmdstanpy/model.py:1503\u001b[0m, in \u001b[0;36mCmdStanModel.variational\u001b[0;34m(self, data, seed, inits, output_dir, sig_figs, save_latent_dynamics, save_profile, algorithm, iter, grad_samples, elbo_samples, eta, adapt_engaged, adapt_iter, tol_rel_obj, eval_elbo, output_samples, require_converged, show_console, refresh, time_fmt)\u001b[0m\n\u001b[1;32m 1501\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mlen\u001b[39m(re\u001b[38;5;241m.\u001b[39mfindall(pat, contents)) \u001b[38;5;241m>\u001b[39m \u001b[38;5;241m0\u001b[39m:\n\u001b[1;32m 1502\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m require_converged:\n\u001b[0;32m-> 1503\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mRuntimeError\u001b[39;00m(\n\u001b[1;32m 1504\u001b[0m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mThe algorithm may not have converged.\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;124m'\u001b[39m\n\u001b[1;32m 1505\u001b[0m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mIf you would like to inspect the output, \u001b[39m\u001b[38;5;124m'\u001b[39m\n\u001b[1;32m 1506\u001b[0m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mre-call with require_converged=False\u001b[39m\u001b[38;5;124m'\u001b[39m\n\u001b[1;32m 1507\u001b[0m )\n\u001b[1;32m 1508\u001b[0m \u001b[38;5;66;03m# else:\u001b[39;00m\n\u001b[1;32m 1509\u001b[0m get_logger()\u001b[38;5;241m.\u001b[39mwarning(\n\u001b[1;32m 1510\u001b[0m \u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m,\n\u001b[1;32m 1511\u001b[0m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mThe algorithm may not have converged.\u001b[39m\u001b[38;5;124m'\u001b[39m,\n\u001b[1;32m 1512\u001b[0m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mProceeding because require_converged is set to False\u001b[39m\u001b[38;5;124m'\u001b[39m,\n\u001b[1;32m 1513\u001b[0m )\n",
+ "Cell \u001b[0;32mIn [5], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m model_fail \u001b[38;5;241m=\u001b[39m CmdStanModel(stan_file\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124meta_should_fail.stan\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m----> 2\u001b[0m vi_fail \u001b[38;5;241m=\u001b[39m \u001b[43mmodel_fail\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mvariational\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n",
+ "File \u001b[0;32m~/work/cmdstanpy/cmdstanpy/cmdstanpy/model.py:1516\u001b[0m, in \u001b[0;36mCmdStanModel.variational\u001b[0;34m(self, data, seed, inits, output_dir, sig_figs, save_latent_dynamics, save_profile, algorithm, iter, grad_samples, elbo_samples, eta, adapt_engaged, adapt_iter, tol_rel_obj, eval_elbo, output_samples, require_converged, show_console, refresh, time_fmt, timeout)\u001b[0m\n\u001b[1;32m 1514\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mlen\u001b[39m(re\u001b[38;5;241m.\u001b[39mfindall(pat, contents)) \u001b[38;5;241m>\u001b[39m \u001b[38;5;241m0\u001b[39m:\n\u001b[1;32m 1515\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m require_converged:\n\u001b[0;32m-> 1516\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mRuntimeError\u001b[39;00m(\n\u001b[1;32m 1517\u001b[0m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mThe algorithm may not have converged.\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;124m'\u001b[39m\n\u001b[1;32m 1518\u001b[0m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mIf you would like to inspect the output, \u001b[39m\u001b[38;5;124m'\u001b[39m\n\u001b[1;32m 1519\u001b[0m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mre-call with require_converged=False\u001b[39m\u001b[38;5;124m'\u001b[39m\n\u001b[1;32m 1520\u001b[0m )\n\u001b[1;32m 1521\u001b[0m \u001b[38;5;66;03m# else:\u001b[39;00m\n\u001b[1;32m 1522\u001b[0m get_logger()\u001b[38;5;241m.\u001b[39mwarning(\n\u001b[1;32m 1523\u001b[0m \u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m,\n\u001b[1;32m 1524\u001b[0m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mThe algorithm may not have converged.\u001b[39m\u001b[38;5;124m'\u001b[39m,\n\u001b[1;32m 1525\u001b[0m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mProceeding because require_converged is set to False\u001b[39m\u001b[38;5;124m'\u001b[39m,\n\u001b[1;32m 1526\u001b[0m )\n",
"\u001b[0;31mRuntimeError\u001b[0m: The algorithm may not have converged.\nIf you would like to inspect the output, re-call with require_converged=False"
]
}
@@ -253,10 +253,10 @@
"execution_count": 6,
"metadata": {
"execution": {
- "iopub.execute_input": "2022-08-25T13:30:08.958204Z",
- "iopub.status.busy": "2022-08-25T13:30:08.957951Z",
- "iopub.status.idle": "2022-08-25T13:30:09.019084Z",
- "shell.execute_reply": "2022-08-25T13:30:09.018340Z"
+ "iopub.execute_input": "2022-10-25T14:00:34.062165Z",
+ "iopub.status.busy": "2022-10-25T14:00:34.061829Z",
+ "iopub.status.idle": "2022-10-25T14:00:34.133854Z",
+ "shell.execute_reply": "2022-10-25T14:00:34.132866Z"
}
},
"outputs": [
@@ -264,21 +264,21 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "13:30:08 - cmdstanpy - INFO - Chain [1] start processing\n"
+ "14:00:34 - cmdstanpy - INFO - Chain [1] start processing\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
- "13:30:09 - cmdstanpy - INFO - Chain [1] done processing\n"
+ "14:00:34 - cmdstanpy - INFO - Chain [1] done processing\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
- "13:30:09 - cmdstanpy - WARNING - The algorithm may not have converged.\n",
+ "14:00:34 - cmdstanpy - WARNING - The algorithm may not have converged.\n",
"Proceeding because require_converged is set to False\n"
]
}
@@ -299,10 +299,10 @@
"execution_count": 7,
"metadata": {
"execution": {
- "iopub.execute_input": "2022-08-25T13:30:09.022964Z",
- "iopub.status.busy": "2022-08-25T13:30:09.022506Z",
- "iopub.status.idle": "2022-08-25T13:30:09.033489Z",
- "shell.execute_reply": "2022-08-25T13:30:09.032794Z"
+ "iopub.execute_input": "2022-10-25T14:00:34.139604Z",
+ "iopub.status.busy": "2022-10-25T14:00:34.138498Z",
+ "iopub.status.idle": "2022-10-25T14:00:34.153514Z",
+ "shell.execute_reply": "2022-10-25T14:00:34.152559Z"
}
},
"outputs": [
@@ -312,8 +312,8 @@
"OrderedDict([('lp__', 0.0),\n",
" ('log_p__', 0.0),\n",
" ('log_g__', 0.0),\n",
- " ('mu[1]', -0.0410882),\n",
- " ('mu[2]', 0.0440459)])"
+ " ('mu[1]', 0.0154586),\n",
+ " ('mu[2]', -0.0039066)])"
]
},
"execution_count": 7,
@@ -349,7 +349,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.9.13"
+ "version": "3.9.15"
}
},
"nbformat": 4,
diff --git a/docs/users-guide/hello_world.html b/docs/users-guide/hello_world.html
index 378779d5..805a7e14 100644
--- a/docs/users-guide/hello_world.html
+++ b/docs/users-guide/hello_world.html
@@ -6,7 +6,7 @@
- βHello, World!β — CmdStanPy 1.0.7 documentation
+ βHello, World!β — CmdStanPy 1.0.8 documentation
@@ -59,7 +59,7 @@
@@ -433,13 +433,13 @@ Accessing the results
# access model variable by name
In [9]: print(fit.stan_variable('theta'))
-[0.179125 0.204862 0.192807 ... 0.12798 0.286286 0.248383]
+[0.358901 0.335727 0.359319 ... 0.106376 0.342337 0.323726]
In [10]: print(fit.draws_pd('theta')[:3])
theta
-0 0.179125
-1 0.204862
-2 0.192807
+0 0.358901
+1 0.335727
+2 0.359319
In [11]: print(fit.draws_xr('theta'))
<xarray.Dataset>
@@ -448,7 +448,7 @@ Accessing the results * chain (chain) int64 1 2 3 4
* draw (draw) int64 0 1 2 3 4 5 6 7 8 ... 992 993 994 995 996 997 998 999
Data variables:
- theta (chain, draw) float64 0.1791 0.2049 0.1928 ... 0.128 0.2863 0.2484
+ theta (chain, draw) float64 0.3589 0.3357 0.3593 ... 0.1064 0.3423 0.3237
Attributes:
stan_version: 2.30.0
model: bernoulli_model
@@ -479,17 +479,17 @@ Accessing the resultsIn [15]: fit.draws_pd()
Out[15]:
lp__ accept_stat__ stepsize__ ... divergent__ energy__ theta
-0 -6.93547 1.000000 1.017540 ... 0.0 7.02660 0.179125
-1 -6.81941 1.000000 1.017540 ... 0.0 6.90990 0.204862
-2 -6.86593 0.988312 1.017540 ... 0.0 6.87645 0.192807
-3 -7.39833 0.865988 1.017540 ... 0.0 7.69372 0.406802
-4 -6.75601 1.000000 1.017540 ... 0.0 7.20515 0.266019
+0 -7.07527 0.953914 0.903413 ... 0.0 7.07652 0.358901
+1 -6.95593 1.000000 0.903413 ... 0.0 7.06948 0.335727
+2 -7.07765 0.990586 0.903413 ... 0.0 7.09961 0.359319
+3 -7.07635 0.926813 0.903413 ... 0.0 7.75164 0.359091
+4 -7.59296 0.880607 0.903413 ... 0.0 7.60144 0.430225
... ... ... ... ... ... ... ...
-3995 -6.75089 1.000000 0.926829 ... 0.0 6.76236 0.240606
-3996 -7.14210 0.909684 0.926829 ... 0.0 7.22993 0.151280
-3997 -7.40014 0.955873 0.926829 ... 0.0 7.42595 0.127980
-3998 -6.78775 0.948321 0.926829 ... 0.0 7.63194 0.286286
-3999 -6.74811 0.999957 0.926829 ... 0.0 6.78531 0.248383
+3995 -6.99833 0.912517 0.858657 ... 0.0 7.36603 0.169198
+3996 -6.90213 0.953438 0.858657 ... 0.0 7.47845 0.323266
+3997 -7.73457 0.670993 0.858657 ... 0.0 9.10937 0.106376
+3998 -6.98744 0.882321 0.858657 ... 0.0 8.96453 0.342337
+3999 -6.90398 1.000000 0.858657 ... 0.0 6.98883 0.323726
[4000 rows x 8 columns]
@@ -501,13 +501,13 @@ Accessing the resultsdiag_e
In [17]: print(fit.metric)
-[[0.509565]
- [0.600678]
- [0.52729 ]
- [0.5595 ]]
+[[0.42496 ]
+ [0.467264]
+ [0.506406]
+ [0.540077]]
In [18]: print(fit.step_size)
-[1.01754 0.887862 1.03376 0.926829]
+[0.903413 0.902643 0.929784 0.858657]
|
The CmdStanMCMC object also provides access to metadata about the model and the sampler run.
@@ -515,7 +515,7 @@ Accessing the resultsbernoulli_model
In [20]: print(fit.metadata.cmdstan_config['seed'])
-79174
+77387
In [21]: print(fit.metadata.stan_vars_cols.keys())
dict_keys(['theta'])
@@ -537,8 +537,8 @@ CmdStan utilities: In [23]: fit.summary()
Out[23]:
Mean MCSE StdDev ... N_Eff N_Eff/s R_hat
-lp__ -7.298720 0.019946 0.753564 ... 1427.36 29736.6 1.00056
-theta 0.247262 0.003402 0.121020 ... 1265.31 26360.7 1.00227
+lp__ -7.294880 0.023511 0.806983 ... 1178.10 22228.3 1.00351
+theta 0.252124 0.003057 0.120963 ... 1565.43 29536.4 1.00286
[2 rows x 9 columns]
@@ -550,7 +550,7 @@ CmdStan utilities: diagnose()
method runs this utility and prints the output to the console.
In [24]: print(fit.diagnose())
-Processing csv files: /tmp/tmpvmhl6e01/bernoulli_rnkfcga/bernoulli-20220825133019_1.csv, /tmp/tmpvmhl6e01/bernoulli_rnkfcga/bernoulli-20220825133019_2.csv, /tmp/tmpvmhl6e01/bernoulli_rnkfcga/bernoulli-20220825133019_3.csv, /tmp/tmpvmhl6e01/bernoulli_rnkfcga/bernoulli-20220825133019_4.csv
+Processing csv files: /tmp/tmp4eva36zg/bernoullityrry5tn/bernoulli-20221025140048_1.csv, /tmp/tmp4eva36zg/bernoullityrry5tn/bernoulli-20221025140048_2.csv, /tmp/tmp4eva36zg/bernoullityrry5tn/bernoulli-20221025140048_3.csv, /tmp/tmp4eva36zg/bernoullityrry5tn/bernoulli-20221025140048_4.csv
Checking sampler transitions treedepth.
Treedepth satisfactory for all transitions.
diff --git a/docs/users-guide/outputs.html b/docs/users-guide/outputs.html
index 697bd167..413c988b 100644
--- a/docs/users-guide/outputs.html
+++ b/docs/users-guide/outputs.html
@@ -6,7 +6,7 @@
- Controlling Outputs — CmdStanPy 1.0.7 documentation
+ Controlling Outputs — CmdStanPy 1.0.8 documentation
@@ -59,7 +59,7 @@
@@ -297,15 +297,15 @@ CSV File OutputsIn [7]: print(fit)
CmdStanMCMC: model=bernoulli chains=4['method=sample', 'algorithm=hmc', 'adapt', 'engaged=1']
csv_files:
- /tmp/tmpvmhl6e01/bernoullil5w0sndq/bernoulli-20220825133019_1.csv
- /tmp/tmpvmhl6e01/bernoullil5w0sndq/bernoulli-20220825133019_2.csv
- /tmp/tmpvmhl6e01/bernoullil5w0sndq/bernoulli-20220825133019_3.csv
- /tmp/tmpvmhl6e01/bernoullil5w0sndq/bernoulli-20220825133019_4.csv
+ /tmp/tmp4eva36zg/bernoulliyzzmuedi/bernoulli-20221025140048_1.csv
+ /tmp/tmp4eva36zg/bernoulliyzzmuedi/bernoulli-20221025140048_2.csv
+ /tmp/tmp4eva36zg/bernoulliyzzmuedi/bernoulli-20221025140048_3.csv
+ /tmp/tmp4eva36zg/bernoulliyzzmuedi/bernoulli-20221025140048_4.csv
output_files:
- /tmp/tmpvmhl6e01/bernoullil5w0sndq/bernoulli-20220825133019_0-stdout.txt
- /tmp/tmpvmhl6e01/bernoullil5w0sndq/bernoulli-20220825133019_1-stdout.txt
- /tmp/tmpvmhl6e01/bernoullil5w0sndq/bernoulli-20220825133019_2-stdout.txt
- /tmp/tmpvmhl6e01/bernoullil5w0sndq/bernoulli-20220825133019_3-stdout.txt
+ /tmp/tmp4eva36zg/bernoulliyzzmuedi/bernoulli-20221025140048_0-stdout.txt
+ /tmp/tmp4eva36zg/bernoulliyzzmuedi/bernoulli-20221025140048_1-stdout.txt
+ /tmp/tmp4eva36zg/bernoulliyzzmuedi/bernoulli-20221025140048_2-stdout.txt
+ /tmp/tmp4eva36zg/bernoulliyzzmuedi/bernoulli-20221025140048_3-stdout.txt
The output_dir
argument is an optional argument which specifies
@@ -319,10 +319,10 @@
CSV File OutputsINFO:cmdstanpy:CmdStan done processing.
In [9]: !ls outputs/
-bernoulli-20220825133020_0-stdout.txt bernoulli-20220825133020_2.csv
-bernoulli-20220825133020_1-stdout.txt bernoulli-20220825133020_3-stdout.txt
-bernoulli-20220825133020_1.csv bernoulli-20220825133020_3.csv
-bernoulli-20220825133020_2-stdout.txt bernoulli-20220825133020_4.csv
+bernoulli-20221025140048_0-stdout.txt bernoulli-20221025140048_2.csv
+bernoulli-20221025140048_1-stdout.txt bernoulli-20221025140048_3-stdout.txt
+bernoulli-20221025140048_1.csv bernoulli-20221025140048_3.csv
+bernoulli-20221025140048_2-stdout.txt bernoulli-20221025140048_4.csv
Alternatively, the save_csvfiles()
function moves the CSV files
@@ -335,8 +335,8 @@
CSV File OutputsIn [11]: fit.save_csvfiles(dir='some/path')
In [12]: !ls some/path
-bernoulli-20220825133020_1.csv bernoulli-20220825133020_3.csv
-bernoulli-20220825133020_2.csv bernoulli-20220825133020_4.csv
+bernoulli-20221025140049_1.csv bernoulli-20221025140049_3.csv
+bernoulli-20221025140049_2.csv bernoulli-20221025140049_4.csv
@@ -347,9 +347,9 @@ LoggingINFO:cmdstanpy:CmdStan start processing
INFO:cmdstanpy:Chain [1] start processing
INFO:cmdstanpy:Chain [2] start processing
-INFO:cmdstanpy:Chain [1] done processing
-INFO:cmdstanpy:Chain [3] start processing
INFO:cmdstanpy:Chain [2] done processing
+INFO:cmdstanpy:Chain [3] start processing
+INFO:cmdstanpy:Chain [1] done processing
INFO:cmdstanpy:Chain [4] start processing
INFO:cmdstanpy:Chain [3] done processing
INFO:cmdstanpy:Chain [4] done processing
@@ -399,40 +399,40 @@ Logging ....: for line in logs.readlines():
....: print(line.strip())
....:
-13:30:20 - cmdstanpy - DEBUG - cmd: /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/bernoulli info
+14:00:49 - cmdstanpy - DEBUG - cmd: /home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/bernoulli info
cwd: None
-13:30:20 - cmdstanpy - INFO - CmdStan start processing
-13:30:20 - cmdstanpy - DEBUG - idx 0
-13:30:20 - cmdstanpy - DEBUG - running CmdStan, num_threads: 1
-13:30:20 - cmdstanpy - DEBUG - CmdStan args: ['/home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/bernoulli', 'id=1', 'random', 'seed=46798', 'data', 'file=users-guide/examples/bernoulli.data.json', 'output', 'file=/tmp/tmpvmhl6e01/bernoulliqddsdaoh/bernoulli-20220825133020_1.csv', 'method=sample', 'algorithm=hmc', 'adapt', 'engaged=1']
-13:30:20 - cmdstanpy - INFO - Chain [1] start processing
-13:30:20 - cmdstanpy - DEBUG - idx 1
-13:30:20 - cmdstanpy - DEBUG - running CmdStan, num_threads: 1
-13:30:20 - cmdstanpy - DEBUG - CmdStan args: ['/home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/bernoulli', 'id=2', 'random', 'seed=46798', 'data', 'file=users-guide/examples/bernoulli.data.json', 'output', 'file=/tmp/tmpvmhl6e01/bernoulliqddsdaoh/bernoulli-20220825133020_2.csv', 'method=sample', 'algorithm=hmc', 'adapt', 'engaged=1']
-13:30:20 - cmdstanpy - INFO - Chain [2] start processing
-13:30:20 - cmdstanpy - INFO - Chain [1] done processing
-13:30:20 - cmdstanpy - DEBUG - idx 2
-13:30:20 - cmdstanpy - DEBUG - running CmdStan, num_threads: 1
-13:30:20 - cmdstanpy - DEBUG - CmdStan args: ['/home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/bernoulli', 'id=3', 'random', 'seed=46798', 'data', 'file=users-guide/examples/bernoulli.data.json', 'output', 'file=/tmp/tmpvmhl6e01/bernoulliqddsdaoh/bernoulli-20220825133020_3.csv', 'method=sample', 'algorithm=hmc', 'adapt', 'engaged=1']
-13:30:20 - cmdstanpy - INFO - Chain [3] start processing
-13:30:20 - cmdstanpy - INFO - Chain [2] done processing
-13:30:20 - cmdstanpy - DEBUG - idx 3
-13:30:20 - cmdstanpy - DEBUG - running CmdStan, num_threads: 1
-13:30:20 - cmdstanpy - DEBUG - CmdStan args: ['/home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/bernoulli', 'id=4', 'random', 'seed=46798', 'data', 'file=users-guide/examples/bernoulli.data.json', 'output', 'file=/tmp/tmpvmhl6e01/bernoulliqddsdaoh/bernoulli-20220825133020_4.csv', 'method=sample', 'algorithm=hmc', 'adapt', 'engaged=1']
-13:30:20 - cmdstanpy - INFO - Chain [4] start processing
-13:30:20 - cmdstanpy - INFO - Chain [3] done processing
-13:30:20 - cmdstanpy - INFO - Chain [4] done processing
-13:30:20 - cmdstanpy - DEBUG - runset
+14:00:49 - cmdstanpy - INFO - CmdStan start processing
+14:00:49 - cmdstanpy - DEBUG - idx 0
+14:00:49 - cmdstanpy - DEBUG - running CmdStan, num_threads: 1
+14:00:49 - cmdstanpy - DEBUG - CmdStan args: ['/home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/bernoulli', 'id=1', 'random', 'seed=20102', 'data', 'file=users-guide/examples/bernoulli.data.json', 'output', 'file=/tmp/tmp4eva36zg/bernoulli8epzm16g/bernoulli-20221025140049_1.csv', 'method=sample', 'algorithm=hmc', 'adapt', 'engaged=1']
+14:00:49 - cmdstanpy - INFO - Chain [1] start processing
+14:00:49 - cmdstanpy - DEBUG - idx 1
+14:00:49 - cmdstanpy - DEBUG - running CmdStan, num_threads: 1
+14:00:49 - cmdstanpy - DEBUG - CmdStan args: ['/home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/bernoulli', 'id=2', 'random', 'seed=20102', 'data', 'file=users-guide/examples/bernoulli.data.json', 'output', 'file=/tmp/tmp4eva36zg/bernoulli8epzm16g/bernoulli-20221025140049_2.csv', 'method=sample', 'algorithm=hmc', 'adapt', 'engaged=1']
+14:00:49 - cmdstanpy - INFO - Chain [2] start processing
+14:00:49 - cmdstanpy - INFO - Chain [2] done processing
+14:00:49 - cmdstanpy - DEBUG - idx 2
+14:00:49 - cmdstanpy - DEBUG - running CmdStan, num_threads: 1
+14:00:49 - cmdstanpy - DEBUG - CmdStan args: ['/home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/bernoulli', 'id=3', 'random', 'seed=20102', 'data', 'file=users-guide/examples/bernoulli.data.json', 'output', 'file=/tmp/tmp4eva36zg/bernoulli8epzm16g/bernoulli-20221025140049_3.csv', 'method=sample', 'algorithm=hmc', 'adapt', 'engaged=1']
+14:00:49 - cmdstanpy - INFO - Chain [3] start processing
+14:00:49 - cmdstanpy - INFO - Chain [1] done processing
+14:00:49 - cmdstanpy - DEBUG - idx 3
+14:00:49 - cmdstanpy - DEBUG - running CmdStan, num_threads: 1
+14:00:49 - cmdstanpy - DEBUG - CmdStan args: ['/home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/bernoulli', 'id=4', 'random', 'seed=20102', 'data', 'file=users-guide/examples/bernoulli.data.json', 'output', 'file=/tmp/tmp4eva36zg/bernoulli8epzm16g/bernoulli-20221025140049_4.csv', 'method=sample', 'algorithm=hmc', 'adapt', 'engaged=1']
+14:00:49 - cmdstanpy - INFO - Chain [4] start processing
+14:00:49 - cmdstanpy - INFO - Chain [3] done processing
+14:00:49 - cmdstanpy - INFO - Chain [4] done processing
+14:00:49 - cmdstanpy - DEBUG - runset
RunSet: chains=4, chain_ids=[1, 2, 3, 4], num_processes=4
cmd (chain 1):
-['/home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/bernoulli', 'id=1', 'random', 'seed=46798', 'data', 'file=users-guide/examples/bernoulli.data.json', 'output', 'file=/tmp/tmpvmhl6e01/bernoulliqddsdaoh/bernoulli-20220825133020_1.csv', 'method=sample', 'algorithm=hmc', 'adapt', 'engaged=1']
+['/home/runner/work/cmdstanpy/cmdstanpy/docsrc/users-guide/examples/bernoulli', 'id=1', 'random', 'seed=20102', 'data', 'file=users-guide/examples/bernoulli.data.json', 'output', 'file=/tmp/tmp4eva36zg/bernoulli8epzm16g/bernoulli-20221025140049_1.csv', 'method=sample', 'algorithm=hmc', 'adapt', 'engaged=1']
retcodes=[0, 0, 0, 0]
per-chain output files (showing chain 1 only):
csv_file:
-/tmp/tmpvmhl6e01/bernoulliqddsdaoh/bernoulli-20220825133020_1.csv
+/tmp/tmp4eva36zg/bernoulli8epzm16g/bernoulli-20221025140049_1.csv
console_msgs (if any):
-/tmp/tmpvmhl6e01/bernoulliqddsdaoh/bernoulli-20220825133020_0-stdout.txt
-13:30:20 - cmdstanpy - DEBUG - Chain 1 console:
+/tmp/tmp4eva36zg/bernoulli8epzm16g/bernoulli-20221025140049_0-stdout.txt
+14:00:49 - cmdstanpy - DEBUG - Chain 1 console:
method = sample (Default)
sample
num_samples = 1000 (Default)
@@ -463,9 +463,9 @@ Loggingfile = users-guide/examples/bernoulli.data.json
init = 2 (Default)
random
-seed = 46798
+seed = 20102
output
-file = /tmp/tmpvmhl6e01/bernoulliqddsdaoh/bernoulli-20220825133020_1.csv
+file = /tmp/tmp4eva36zg/bernoulli8epzm16g/bernoulli-20221025140049_1.csv
diagnostic_file = (Default)
refresh = 100 (Default)
sig_figs = -1 (Default)
@@ -473,8 +473,8 @@ Loggingnum_threads = 1 (Default)
-Gradient evaluation took 4e-06 seconds
-1000 transitions using 10 leapfrog steps per transition would take 0.04 seconds.
+Gradient evaluation took 3e-06 seconds
+1000 transitions using 10 leapfrog steps per transition would take 0.03 seconds.
Adjust your expectations accordingly!
@@ -501,9 +501,9 @@ LoggingIteration: 1900 / 2000 [ 95%] (Sampling)
Iteration: 2000 / 2000 [100%] (Sampling)
-Elapsed Time: 0.004 seconds (Warm-up)
-0.01 seconds (Sampling)
-0.014 seconds (Total)
+Elapsed Time: 0.007 seconds (Warm-up)
+0.019 seconds (Sampling)
+0.026 seconds (Total)
diff --git a/docs/users-guide/overview.html b/docs/users-guide/overview.html
index 6960556e..4894fcfb 100644
--- a/docs/users-guide/overview.html
+++ b/docs/users-guide/overview.html
@@ -6,7 +6,7 @@
- Overview — CmdStanPy 1.0.7 documentation
+ Overview — CmdStanPy 1.0.8 documentation
@@ -59,7 +59,7 @@
diff --git a/docs/users-guide/workflow.html b/docs/users-guide/workflow.html
index f9c27536..e409de4f 100644
--- a/docs/users-guide/workflow.html
+++ b/docs/users-guide/workflow.html
@@ -6,7 +6,7 @@
- CmdStanPy Workflow — CmdStanPy 1.0.7 documentation
+ CmdStanPy Workflow — CmdStanPy 1.0.8 documentation
@@ -59,7 +59,7 @@
@@ -476,7 +476,7 @@ Output dataCmdStanMCMC
and CmdStanGQ
return the sample contents
in tabular form, see draws()
and draws_pd()
.
Similarly, the draws_xr()
method returns the sample
-contents as an xarray.Dataset
which is a mapping from variable names to their respective values.
+contents as an xarray.Dataset
which is a mapping from variable names to their respective values.