Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add warmup iterations and _group_warmup #1126

Merged
merged 16 commits into from
Apr 6, 2020
Merged

Conversation

ahartikainen
Copy link
Contributor

@ahartikainen ahartikainen commented Mar 28, 2020

Description

Implement save_warmup for PyStan.

Adds _groups_warmup to InferenceData.

Warmup groups must start with _warmup_.

Checklist

  • Follows official PR format
  • New features are properly documented (with an example if appropriate)?
  • Includes new or updated tests to cover the new feature
  • Code style correct (follows pylint and black guidelines)
  • Changes are listed in changelog

@codecov
Copy link

codecov bot commented Mar 28, 2020

Codecov Report

Merging #1126 into master will decrease coverage by 0.12%.
The diff coverage is 87.70%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1126      +/-   ##
==========================================
- Coverage   92.70%   92.58%   -0.13%     
==========================================
  Files          93       93              
  Lines        9023     9129     +106     
==========================================
+ Hits         8365     8452      +87     
- Misses        658      677      +19     
Impacted Files Coverage Δ
arviz/plots/backends/__init__.py 29.11% <ø> (ø)
arviz/rcparams.py 93.10% <ø> (ø)
arviz/utils.py 90.00% <0.00%> (-0.96%) ⬇️
arviz/data/inference_data.py 81.88% <83.01%> (-1.26%) ⬇️
arviz/data/io_pystan.py 98.67% <95.45%> (-0.40%) ⬇️
arviz/plots/backends/bokeh/pairplot.py 75.19% <0.00%> (-1.42%) ⬇️
arviz/data/io_pyro.py 95.86% <0.00%> (-1.37%) ⬇️
arviz/plots/pairplot.py 92.68% <0.00%> (-1.22%) ⬇️
arviz/plots/backends/matplotlib/pairplot.py 70.89% <0.00%> (-0.10%) ⬇️
arviz/plots/densityplot.py 93.33% <0.00%> (+1.66%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e5208d1...de1f88a. Read the comment docs.

@ahartikainen
Copy link
Contributor Author

ahartikainen commented Mar 28, 2020

Hi,

we need to decide on a few things

  • is _groups_warmup good way to implement this
  • should we show more of the warmup groups in the repr?
  • what term is used: warmup, tuning, burn-in (no thanks for burn-in), something other?

@canyon289
Copy link
Member

This is look great. Thank you Ari!

Copy link
Member

@OriolAbril OriolAbril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I figured it could also be of interest to @michaelosthege.

arviz/data/inference_data.pyi Show resolved Hide resolved
@michaelosthege
Copy link
Contributor

michaelosthege commented Mar 30, 2020

@OriolAbril indeed, thanks!

In PyMC3 we recently added properties to track the number of tuning iterations in the sampler report. (The tune sampler_stat is not always available.)
@ahartikainen Would this be something to consider in arviz.from_pymc3 to automatically splice our traces too?

EDIT: forgot to link pymc-devs/pymc#3827

@ahartikainen
Copy link
Contributor Author

Yes, pymc should have this too (and other interfaces).

I have used pystan here as a first example.

@ahartikainen ahartikainen changed the title [WIP] Add warmup iterations and _group_warmup Add warmup iterations and _group_warmup Mar 31, 2020
@ahartikainen ahartikainen merged commit 6600929 into master Apr 6, 2020
@ahartikainen ahartikainen deleted the stan_sampler_info branch April 6, 2020 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants