From 9a59a1afae056da0ca0b549a63d30682a7cf6535 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 20:42:33 +0000 Subject: [PATCH] release/v1.2.1: updating version numbers --- cmdstanpy/_version.py | 2 +- docs/_modules/cmdstanpy/cmdstan_args.html | 68 +- docs/_modules/cmdstanpy/compilation.html | 47 +- docs/_modules/cmdstanpy/model.html | 108 +- docs/_modules/cmdstanpy/stanfit.html | 47 +- docs/_modules/cmdstanpy/stanfit/gq.html | 59 +- docs/_modules/cmdstanpy/stanfit/laplace.html | 47 +- docs/_modules/cmdstanpy/stanfit/mcmc.html | 59 +- docs/_modules/cmdstanpy/stanfit/metadata.html | 47 +- docs/_modules/cmdstanpy/stanfit/mle.html | 47 +- .../cmdstanpy/stanfit/pathfinder.html | 59 +- docs/_modules/cmdstanpy/stanfit/runset.html | 47 +- docs/_modules/cmdstanpy/stanfit/vb.html | 47 +- docs/_modules/cmdstanpy/utils.html | 47 +- docs/_modules/cmdstanpy/utils/cmdstan.html | 47 +- docs/_modules/index.html | 47 +- docs/_modules/stanio/json.html | 47 +- docs/_sources/changes.rst.txt | 12 + docs/_sources/users-guide/workflow.rst.txt | 4 +- .../_sphinx_javascript_frameworks_compat.js | 134 ++ docs/_static/basic.css | 56 +- docs/_static/doctools.js | 418 +--- docs/_static/documentation_options.js | 4 +- .../{jquery-3.5.1.js => jquery-3.6.0.js} | 227 +- docs/_static/jquery.js | 4 +- docs/_static/language_data.js | 100 +- docs/_static/searchtools.js | 821 +++---- docs/_static/sphinx_highlight.js | 144 ++ docs/_static/styles/pydata-sphinx-theme.css | 2 +- docs/_static/webpack-macros.html | 47 +- docs/api.html | 2061 ++++++++++++----- docs/changes.html | 92 +- docs/community.html | 57 +- docs/genindex.html | 53 +- docs/index.html | 127 +- docs/installation.html | 71 +- docs/internal_api.html | 976 +++++--- docs/objects.inv | Bin 5716 -> 5746 bytes docs/py-modindex.html | 47 +- docs/search.html | 47 +- docs/searchindex.js | 2 +- docs/users-guide.html | 51 +- docs/users-guide/examples.html | 51 +- docs/users-guide/examples/MCMC Sampling.html | 87 +- .../Maximum Likelihood Estimation.html | 73 +- .../Maximum Likelihood Estimation.ipynb | 20 +- docs/users-guide/examples/Pathfinder.html | 78 +- docs/users-guide/examples/Pathfinder.ipynb | 78 +- .../examples/Run Generated Quantities.html | 489 +++- .../examples/Run Generated Quantities.ipynb | 234 +- .../examples/Using External C++.html | 51 +- .../examples/VI as Sampler Inits.html | 57 +- .../examples/Variational Inference.html | 158 +- .../examples/Variational Inference.ipynb | 82 +- docs/users-guide/hello_world.html | 121 +- docs/users-guide/outputs.html | 165 +- docs/users-guide/overview.html | 51 +- docs/users-guide/workflow.html | 69 +- 58 files changed, 5169 insertions(+), 3124 deletions(-) create mode 100644 docs/_static/_sphinx_javascript_frameworks_compat.js rename docs/_static/{jquery-3.5.1.js => jquery-3.6.0.js} (98%) create mode 100644 docs/_static/sphinx_highlight.js diff --git a/cmdstanpy/_version.py b/cmdstanpy/_version.py index 2503b9d9..d221d8be 100644 --- a/cmdstanpy/_version.py +++ b/cmdstanpy/_version.py @@ -1,3 +1,3 @@ """PyPi Version""" -__version__ = '1.2.0' +__version__ = '1.2.1' diff --git a/docs/_modules/cmdstanpy/cmdstan_args.html b/docs/_modules/cmdstanpy/cmdstan_args.html index 2f76a4fd..92a94c40 100644 --- a/docs/_modules/cmdstanpy/cmdstan_args.html +++ b/docs/_modules/cmdstanpy/cmdstan_args.html @@ -1,35 +1,39 @@ - +
-
from typing import Any, Dict, List, Mapping, Optional, Union
import numpy as np
-from numpy.random import RandomState
+from numpy.random import default_rng
from cmdstanpy import _TMPDIR
from cmdstanpy.utils import (
@@ -308,10 +312,9 @@ Source code for cmdstanpy.cmdstan_args
'Value for iter_warmup must be a non-negative integer,'
' found {}.'.format(self.iter_warmup)
)
- if self.iter_warmup > 0 and not self.adapt_engaged:
+ if self.iter_warmup == 0 and self.adapt_engaged:
raise ValueError(
- 'Argument "adapt_engaged" is False, '
- 'cannot specify warmup iterations.'
+ 'Must specify iter_warmup > 0 when adapt_engaged=True.'
)
if self.iter_sampling is not None:
if self.iter_sampling < 0 or not isinstance(
@@ -710,6 +713,8 @@ Source code for cmdstanpy.cmdstan_args
num_draws: Optional[int] = None,
num_elbo_draws: Optional[int] = None,
save_single_paths: bool = False,
+ psis_resample: bool = True,
+ calculate_lp: bool = True,
) -> None:
self.init_alpha = init_alpha
self.tol_obj = tol_obj
@@ -726,6 +731,8 @@ Source code for cmdstanpy.cmdstan_args
self.num_elbo_draws = num_elbo_draws
self.save_single_paths = save_single_paths
+ self.psis_resample = psis_resample
+ self.calculate_lp = calculate_lp
[docs] def validate(self, _chains: Optional[int] = None) -> None:
"""
@@ -778,6 +785,12 @@ Source code for cmdstanpy.cmdstan_args
if self.save_single_paths:
cmd.append('save_single_paths=1')
+ if not self.psis_resample:
+ cmd.append('psis_resample=0')
+
+ if not self.calculate_lp:
+ cmd.append('calculate_lp=0')
+
return cmd
@@ -1037,8 +1050,8 @@ Source code for cmdstanpy.cmdstan_args
)
if self.seed is None:
- rng = RandomState()
- self.seed = rng.randint(1, 99999 + 1)
+ rng = default_rng()
+ self.seed = rng.integers(low=1, high=99999, size=1).item()
else:
if not isinstance(self.seed, (int, list, np.integer)):
raise ValueError(
@@ -1177,9 +1190,8 @@ Source code for cmdstanpy.cmdstan_args
-
-
-