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 None for fields not used in beanmachine converter #2154

Merged
merged 7 commits into from
Dec 6, 2022

Conversation

zaxtax
Copy link
Contributor

@zaxtax zaxtax commented Nov 3, 2022

Description

This is a bug fix to handle when observations and posterior_predictive is missing from the MonteCarloSamples object

Checklist

  • Follows official PR format
  • Includes a sample plot to visually illustrate the changes (only for plot-related functions)
  • 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

📚 Documentation preview 📚: https://arviz--2154.org.readthedocs.build/en/2154/

@zaxtax zaxtax force-pushed the beanmachine_loader_bugfix branch from d2604da to 5ea6a3c Compare November 4, 2022 21:11
@codecov
Copy link

codecov bot commented Nov 4, 2022

Codecov Report

Merging #2154 (313133a) into main (e87d9e3) will increase coverage by 2.22%.
The diff coverage is 25.00%.

@@            Coverage Diff             @@
##             main    #2154      +/-   ##
==========================================
+ Coverage   87.73%   89.95%   +2.22%     
==========================================
  Files         119      119              
  Lines       12394    12398       +4     
==========================================
+ Hits        10874    11153     +279     
+ Misses       1520     1245     -275     
Impacted Files Coverage Δ
arviz/data/io_beanmachine.py 92.68% <25.00%> (+54.84%) ⬆️
arviz/data/inference_data.py 83.05% <0.00%> (+0.13%) ⬆️
arviz/data/base.py 98.21% <0.00%> (+0.59%) ⬆️
arviz/data/io_emcee.py 98.29% <0.00%> (+2.56%) ⬆️
arviz/data/io_pystan.py 96.89% <0.00%> (+45.70%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@OriolAbril
Copy link
Member

Can you also add some tests or an issue so we remember we need to add them at some point?

@zaxtax
Copy link
Contributor Author

zaxtax commented Nov 5, 2022 via email

@zaxtax zaxtax force-pushed the beanmachine_loader_bugfix branch from 9646758 to 5035989 Compare December 5, 2022 05:06
@zaxtax zaxtax force-pushed the beanmachine_loader_bugfix branch from cd29fdc to d68d9ce Compare December 5, 2022 13:46
@zaxtax
Copy link
Contributor Author

zaxtax commented Dec 5, 2022

Added tests

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.

Thanks! I have added some comments to try and use check_multiple_attrs if possible so tests are in line with the other libraries. But I am not sure if they'd be equivalent.

@zaxtax
Copy link
Contributor Author

zaxtax commented Dec 6, 2022 via email

@OriolAbril
Copy link
Member

let's merge like this then, the goal of check_multiple_attrs is making it easier to write extensive tests but now they are already written and they do what they are supposed to do. Can you add to the changelog and fix the two unresolved comments? Otherwise I'll try to do it later today.

zaxtax and others added 3 commits December 6, 2022 12:38
Co-authored-by: Oriol Abril-Pla <oriol.abril.pla@gmail.com>
Co-authored-by: Oriol Abril-Pla <oriol.abril.pla@gmail.com>
@OriolAbril OriolAbril merged commit af34307 into arviz-devs:main Dec 6, 2022
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