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

Deal with PyMC3 traces that do not contain n_draws information in the sampler report #1209

Merged
merged 6 commits into from
May 25, 2020

Conversation

michaelosthege
Copy link
Contributor

@michaelosthege michaelosthege commented May 25, 2020

Description

This is a hotfix for #1208

In short: When traces are sliced manually, the n_draws information is lost. With the latest arviz version, this breaks some PyMC3 tests and potentially user workflows.

These changes modify how n_draws is checked such that it falls back to the previous behavior when n_draws is unavailable.

Checklist

  • Follows official PR format
  • Includes new or updated tests to cover the new feature
  • Code style correct (follows pylint and black guidelines)
  • Changes are listed in changelog

+ also warn the user about manually slicing
+ closes arviz-devs#1208
+ bumps to 0.8.2 because of the hotfix
@codecov
Copy link

codecov bot commented May 25, 2020

Codecov Report

Merging #1209 into master will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1209      +/-   ##
==========================================
+ Coverage   93.10%   93.14%   +0.04%     
==========================================
  Files          94       94              
  Lines        9480     9480              
==========================================
+ Hits         8826     8830       +4     
+ Misses        654      650       -4     
Impacted Files Coverage Δ
arviz/data/io_pymc3.py 93.20% <100.00%> (+1.60%) ⬆️

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 cf7c19e...f51cf4a. Read the comment docs.

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.

we can merge after changes and I'll upload new release to pypi

arviz/tests/external_tests/test_data_pymc.py Outdated Show resolved Hide resolved
arviz/tests/external_tests/test_data_pymc.py Outdated Show resolved Hide resolved
@OriolAbril OriolAbril merged commit 6b4de81 into arviz-devs:master May 25, 2020
@michaelosthege michaelosthege deleted the fix-1208 branch May 25, 2020 23:29
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.

2 participants