Skip to content

Commit fdcf1d3

Browse files
committed
Merge branch 'develop' of https://github.com/stan-dev/cmdstanpy into develop
2 parents 4aa3c3f + 07aa27d commit fdcf1d3

5 files changed

Lines changed: 44 additions & 12 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353

5454
- name: Install dependencies (python)
5555
run: |
56-
pip install --upgrade pip wheel
56+
python -m pip install --upgrade pip wheel
5757
pip install -r requirements.txt
5858
pip install -r requirements-test.txt
5959
pip install codecov

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
3333
- name: Install dependencies (python)
3434
run: |
35-
pip install --upgrade pip wheel twine codecov sphinx nbsphinx ipython ipykernel pydata-sphinx-theme requests sphinx-copybutton matplotlib
35+
python -m pip install --upgrade pip wheel twine codecov sphinx nbsphinx ipython ipykernel pydata-sphinx-theme requests sphinx-copybutton matplotlib
3636
pip install -r requirements.txt
3737
pip install -e .
3838

cmdstanpy/model.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,10 +1175,13 @@ def sample(
11751175
" force_one_process_per_chain to True"
11761176
)
11771177

1178-
if not runset._check_retcodes():
1179-
msg = 'Error during sampling:\n{}'.format(runset.get_err_msgs())
1180-
msg = '{}Command and output files:\n{}'.format(
1181-
msg, runset.__repr__()
1178+
errors = runset.get_err_msgs()
1179+
if errors or not runset._check_retcodes():
1180+
msg = (
1181+
f'Error during sampling:\n{errors}\n'
1182+
+ f'Command and output files:\n{repr(runset)}\n'
1183+
+ 'Consider re-running with show_console=True if the above'
1184+
+ ' output is unclear!'
11821185
)
11831186
raise RuntimeError(msg)
11841187

@@ -1317,12 +1320,13 @@ def generate_quantities(
13171320
show_console=show_console,
13181321
)
13191322

1320-
if not runset._check_retcodes():
1321-
msg = 'Error during generate_quantities:\n{}'.format(
1322-
runset.get_err_msgs()
1323-
)
1324-
msg = '{}Command and output files:\n{}'.format(
1325-
msg, runset.__repr__()
1323+
errors = runset.get_err_msgs()
1324+
if errors:
1325+
msg = (
1326+
f'Error during generate_quantities:\n{errors}\n'
1327+
+ f'Command and output files:\n{repr(runset)}\n'
1328+
+ 'Consider re-running with show_console=True if the above'
1329+
+ ' output is unclear!'
13261330
)
13271331
raise RuntimeError(msg)
13281332
quantities = CmdStanGQ(runset=runset, mcmc_sample=mcmc_fit)

docsrc/community.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Community
2+
=========
3+
4+
This page highlights community projects that involve CmdStanPy. Check them out!
5+
6+
Project templates
7+
-----------------
8+
9+
Templates are a great way to piggy back on other users' work, saving you time
10+
when you start a new project.
11+
12+
- `cookiecutter-cmdstanpy-analysis
13+
<https://github.com/teddygroves/cookiecutter-cmdstanpy-analysis>`_ A
14+
cookiecutter template for cmdstanpy-based statistical analysis projects.
15+
16+
Software
17+
--------
18+
19+
- `Prophet <https://github.com/facebook/prophet>`_ A procedure for forecasting
20+
time series data based on an additive model where non-linear trends are fit
21+
with yearly, weekly, and daily seasonality, plus holiday effects.
22+
23+
- `ArviZ <https://github.com/arviz-devs/arviz>`_ A Python package (with a `Julia
24+
interface <https://julia.arviz.org/stable/>`_) for exploratory analysis of
25+
Bayesian models. Includes functions for posterior analysis, data storage,
26+
model checking, comparison and diagnostics.
27+

docsrc/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ set of model, data, and posterior estimates.
2929
hello_world
3030
workflow
3131
examples
32+
community
3233
api
3334

3435
:ref:`genindex`

0 commit comments

Comments
 (0)