Skip to content

Cosmetic fixes to getting started notebook. #4062

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

Merged
merged 3 commits into from
Aug 21, 2020

Conversation

rpgoldman
Copy link
Contributor

There were some problems with the version on the PyMC3 docs site.
Fixed some warnings. Tidied up some markup (some of which didn't seem to process properly on gh pages), and added a note explaining about pm.Deterministic

There were some problems with the version on the PyMC3 docs site.
Fixed some warnings.  Tidied up some markup (some of which didn't seem to process properly on gh pages), and added a note explaining about pm.Deterministic
@rpgoldman rpgoldman requested a review from fonnesbeck August 21, 2020 02:54
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

Review Jupyter notebook visual diffs & provide feedback on notebooks.


Powered by ReviewNB

@codecov
Copy link

codecov bot commented Aug 21, 2020

Codecov Report

Merging #4062 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4062   +/-   ##
=======================================
  Coverage   86.83%   86.83%           
=======================================
  Files          88       88           
  Lines       14165    14165           
=======================================
  Hits        12300    12300           
  Misses       1865     1865           

Very ugly way to keep xticklabels from crashing into each other. Not sure if this is the right thing, or if ArviZ should be fixed to automatically format date-times better.
Copy link
Contributor

@AlexAndorra AlexAndorra left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @rpgoldman ! I had just one small suggestion about Deterministic

@review-notebook-app
Copy link

review-notebook-app bot commented Aug 21, 2020

View / edit / reply to this conversation on ReviewNB

AlexAndorra commented on 2020-08-21T08:38:55Z
----------------------------------------------------------------

Maybe show how to do it here, as it's very short?rate = pm.Deterministic("rate", pm.math.switch(switchpoint >= years, early_rate, late_rate))


rpgoldman commented on 2020-08-21T14:41:52Z
----------------------------------------------------------------

You are quite right. I have put that in, and will push it to the MR momentarily. Thanks for having a look!

Copy link
Contributor Author

You are quite right. I have put that in, and will push it to the MR momentarily. Thanks for having a look!


View entire conversation on ReviewNB

@review-notebook-app
Copy link

review-notebook-app bot commented Aug 21, 2020

View / edit / reply to this conversation on ReviewNB

fonnesbeck commented on 2020-08-21T14:50:14Z
----------------------------------------------------------------

similarly here, no context required


rpgoldman commented on 2020-08-21T14:54:34Z
----------------------------------------------------------------

It's actually necessary here now. The reason is that az.summary() internally calls az.from_pymc3() to build an InferenceData, and that function needs information from the model in order to do the translation. If you leave it out, you get a warning.

If you look at the version on the PyMC3 docs page, https://docs.pymc.io/notebooks/getting_started.html you will see the warning.

@review-notebook-app
Copy link

review-notebook-app bot commented Aug 21, 2020

View / edit / reply to this conversation on ReviewNB

fonnesbeck commented on 2020-08-21T14:50:14Z
----------------------------------------------------------------

Not a big deal, but the model context is not necessary here.


rpgoldman commented on 2020-08-21T14:55:39Z
----------------------------------------------------------------

See my response above: ArviZ now needs the model for from_pymc3() (this is necessary to appropriately allocate random variables among the various groups in the InferenceData.

Copy link
Contributor Author

It's actually necessary here now. The reason is that az.summary() internally calls az.from_pymc3() to build an InferenceData, and that function needs information from the model in order to do the translation. If you leave it out, you get a warning.

If you look at the version on the PyMC3 docs page, https://docs.pymc.io/notebooks/getting_started.html you will see the warning.


View entire conversation on ReviewNB

Copy link
Contributor Author

See my response above: ArviZ now needs the model for from_pymc3() (this is necessary to appropriately allocate random variables among the various groups in the InferenceData.


View entire conversation on ReviewNB

@fonnesbeck
Copy link
Member

OK, cool. Did not realize that.

@fonnesbeck
Copy link
Member

LGTM then.

@rpgoldman
Copy link
Contributor Author

OK, cool. Did not realize that.

Yes, originally ArviZ was using a sneaky pointer to the model that was stashed in an _strace, which made everyone very nervous, and wouldn't work when loading a saved trace.

@rpgoldman rpgoldman merged commit bf8f0bc into pymc-devs:master Aug 21, 2020
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.

3 participants