-
-
Notifications
You must be signed in to change notification settings - Fork 257
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
Update GLM-linear to use numpy.Generator and ArviZ #149
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@@ -103,9 +103,6 @@ | |||
"metadata": {}, |
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.
Even though we only use it once, I would keep the rng creation in the 2nd cell plus consequent usage of the rng
object, like the example in https://github.com/pymc-devs/pymc3/wiki/PyMC3-Jupyter-Notebook-Style-Guide
Reply via ReviewNB
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.
Sure, I'll add that.
@@ -103,9 +103,6 @@ | |||
"metadata": {}, |
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 you also add the versions of theano and xarray? I added how to in the last point at https://github.com/pymc-devs/pymc3/wiki/PyMC3-Jupyter-Notebook-Style-Guide
Reply via ReviewNB
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.
xarray is not being used in this particular notebook so would it be okay to add its version here?
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.
It looks like it's not being used but it is being used by ArviZ under the hood, like pymc3 uses theano under the hood even if we don't import or call it explicitly.
Looks good, thanks! I have two extra general comments in addition to the ones above. The first one is making sure that you have executed the notebook sequentially after editing the code to make sure everything runs correctly, the second is to modify the PR title to something more descriptive in the context of this repo, sooner or later all notebooks will be updated for arviz, numpy generator and so on, so finding commits with messages about ArviZ would be difficult, some options that come to mind "update glm-linear to v3 best practices" or "update glm-linear to use numpy.Generator and ArviZ" |
thanks for the suggestions, I'll push these changes. |
I don't really know, if the performance difference is not systematic you can then ignore the comment on the issue. It is also not worth to go into the source code of the glm module as it will probably be deprecated and replaced by bambi (as an external dependency) in |
Okay, so if I push a new commit with the suggested changes (adding xarray version and keeping |
Performance will always vary between computers, the runtimes in the docs are at most orientative of the order of magnitude, we should always execute the notebooks and push the changes when modified |
understood. thanks for clarifying. |
so I tried executing
I tried several things and realized that passing -p PACKAGES with a single package works, but it somehow fails with multiple arguments for me. this seemed to work:
and it outputs:
I wanted your input as to whether you also get this error and if the correction I provided will be acceptable since passing |
I think the error comes from the parenthesis. They are in the guide to indicate that this extra args may not be necessary, many notebooks import theano and xarray explicitly and their versions are listed automatically |
okay. running Should I push the commit by breaking the |
My bad, I assumed spaces would work without looking carefully into it. It looks like the separation between theano and xarray has to be a comma instead. Source: https://github.com/rasbt/watermark/blob/master/watermark/watermark.py#L180 |
great, got it! |
…ow best practices
Addresses issue #81 and aims to make the following changes:
General Updates
ArviZ related
figsize
as kwarg to runplot_trace
functionPending