-
Notifications
You must be signed in to change notification settings - Fork 28
Add ArviZ InfData Blog post #405
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
Conversation
@canyon289 is attempting to deploy a commit to the xarray Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great start here!
@jhamman thanks much for this early review. Its still a bit work in progress, I hope you didn't mind 😓 I'll fix this up over this week, and ask a couple of ArviZ devs to give it a look through before asking for a final review. Hope you have a great holiday |
for more information, see https://pre-commit.ci
Co-authored-by: Joe Hamman <jhamman1@gmail.com>
Co-authored-by: Joe Hamman <jhamman1@gmail.com>
Co-authored-by: Joe Hamman <jhamman1@gmail.com>
Co-authored-by: Joe Hamman <jhamman1@gmail.com>
Co-authored-by: Joe Hamman <jhamman1@gmail.com>
for more information, see https://pre-commit.ci
Co-authored-by: Osvaldo A Martin <aloctavodia@gmail.com>
Co-authored-by: Osvaldo A Martin <aloctavodia@gmail.com>
Co-authored-by: Osvaldo A Martin <aloctavodia@gmail.com>
Co-authored-by: Osvaldo A Martin <aloctavodia@gmail.com>
Co-authored-by: Osvaldo A Martin <aloctavodia@gmail.com>
Co-authored-by: Osvaldo A Martin <aloctavodia@gmail.com>
Co-authored-by: Osvaldo A Martin <aloctavodia@gmail.com>
Co-authored-by: Osvaldo A Martin <aloctavodia@gmail.com>
Co-authored-by: Osvaldo A Martin <aloctavodia@gmail.com>
Co-authored-by: Oriol Abril-Pla <oriol.abril.pla@gmail.com> Co-authored-by: Osvaldo A Martin <aloctavodia@gmail.com>
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is super close. I changed the published date to next week. Can we make that happen?
@@ -0,0 +1,114 @@ | |||
--- | |||
title: 'Better Bayesian Workflows with InferenceData and Xarray' | |||
date: '2022-12-17' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
date: '2022-12-17' | |
date: '2023-03-06' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! Love the enthusiasm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pick a new day and we'll work to make it happen!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
date: '2022-12-17' | |
date: '2023-03-14' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
date: '2022-12-17' | |
date: '2023-03-21' |
@OriolAbril think we can get this done in the next two days?
import arviz as az | ||
|
||
data = az.load_arviz_data("centered_eight") | ||
data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we show the repr for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The repr is not very informative, it will look like:
Inference data with groups:
> posterior
> posterior_predictive
> log_likelihood
> sample_stats
> prior
> prior_predictive
> observed_data
> constant_data
If possible though, the html_repr is much more informative (built on top of the dataset one), it is the output of the 2nd code cell in https://python.arviz.org/en/stable/getting_started/WorkingWithInferenceData.html.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should be able to put the html repr in the post.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@OriolAbril I think we could show both the inferencedata repr, and then the repr of one of the groups, which is just an xarray repr. What do you think? Would that better highlight now the two are related?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is simpler to use the inferencedata html repr directly, omce any of the groups is expanded it becomes clear and explicit they are xarray.Dataset objects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really want to get this over the line. What does it take? Should I copy the html from here?
https://python.arviz.org/en/stable/getting_started/XarrayforArviZ.html#an-introduction-to-each
is it a matter of copying it from the static notebook in github, or do I need to do it from jupyter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HTML as been added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i just pushed a few changes with support of HTML repr. this is now working: https://xarray-dev-git-fork-canyon289-infdata-xarray.vercel.app/blog/introducing-inference-data

Co-authored-by: Joe Hamman <jhamman1@gmail.com>
Copied from `idata._repr_html_()` and removed indents to avoid markdown interpreting parts as code
Add html repr
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
@jhamman @andersy005 Oriol and I finally did it we believe. We can't see the preview so we hope the html is good. Let us know if you see anything from your own |
Thanks @canyon289 - I'll try to get this reviewed today and we can aim to publish early next week. |
@jhamman, this is ready for another round of review... @canyon289, thank you very much for your patience! excited to see this completed soon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One copy edit issue for @canyon289 to look at but otherwise, this is ready to go!
Importantly they also remove implicit assumptions of which dimension represents chains and draws,\ | ||
dimensions while necessary for sampling, are not so interesting when trying to perform inference, | ||
similar to how batch dimensions are a computational nuance, but not a modeling nuance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something seems off here but I'm not sure how to edit it appropriately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reedited it, let me know if you like how it sounds now
This was an epic! Thanks for the contribution @canyon289, @aloctavodia, and @OriolAbril! And thanks to @dcherian and @andersy005 for the support/reviews. |
Creating a pr so the ArviZ team can review and edit first.
Will request review from xarray team when ArviZ review complete
ArviZ Devs see this for reference https://xarray.dev/blog/introducing-pint-xarray
Fixes #348