-
-
Notifications
You must be signed in to change notification settings - Fork 269
New notebook on ODEs drawing from the previously scatter work and upd… #478
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
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
View / edit / reply to this conversation on ReviewNB Armavica commented on 2022-12-18T01:42:31Z
gbrunkhorst commented on 2022-12-27T18:30:51Z All comments addressed and will be reflected in the next pull request. Bullet for delta revised to: * Hopefully this is accurate. Armavica commented on 2022-12-29T00:17:04Z Thank you for the changes and yes, I think that this formulation is accurate enough. |
View / edit / reply to this conversation on ReviewNB Armavica commented on 2022-12-18T01:42:31Z Maybe "population" instead of "concentration"? Is there a unit? gbrunkhorst commented on 2022-12-27T18:35:01Z Comment addressed (in the next pull request). Going back to the reference in the Stan example, the units are actually 1000 pelts. |
View / edit / reply to this conversation on ReviewNB Armavica commented on 2022-12-18T01:42:32Z Scipy's gbrunkhorst commented on 2022-12-27T18:46:08Z Per my previous comment, Armavica commented on 2022-12-29T00:15:40Z Ok, thank you for investigating this! Let's keep it like this then. |
View / edit / reply to this conversation on ReviewNB Armavica commented on 2022-12-18T01:42:33Z "to the know" -> "to know" gbrunkhorst commented on 2022-12-27T18:47:17Z Revised for next pull request. |
View / edit / reply to this conversation on ReviewNB Armavica commented on 2022-12-18T01:42:34Z Line #1. # Variable list to give to the sample step parameter
gbrunkhorst commented on 2022-12-27T18:48:19Z Revised for next pull request. |
Thank you for your work, I like this tutorial a lot and even though I don't have much to say about the core of the work, I noted a couple of typos. |
Thank you @Armavica for the helpful comments. I will address all of them in the next week or so. The only comment I might not follow: it would be straight forward to swap in |
Sure, thank you! I am surprised by |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2022-12-22T19:53:57Z I am not sure what is going on here, but it is not recognized by sphinx, tags and authors are not parsed, and the title is also missing. Make sure the cell is markdown cell and the breaklines follow the same pattern as in https://docs.pymc.io/en/latest/contributing/jupyter_style.html#first-cell. If you run pre-commit and push the myst I'll be able to diagnose what is going on much better, here in reviewnb it is impossible to tell.
I would recommend having only 1 level 1 heading in the notebook, here in this cell and removing the one right below. gbrunkhorst commented on 2022-12-27T23:18:18Z OK - I tried again and pushed changes that include the myst.md file. Let me know if you can see the second push. The issue was, I think, that the first cell was raw rather than markdown. Let me know if this works! Thanks! |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2022-12-22T19:53:58Z The block equation is not being rendered correctly in the preview: https://pymcio--478.org.readthedocs.build/projects/examples/en/478/ode_models/ODE_Lotka_Volterra_multiple_ways.html#lotka-volterra-predator-prey-model, maybe it is not in its own line? gbrunkhorst commented on 2022-12-27T20:30:43Z It was on it's own line, but I added two spaces to the previous line - I hope this takes care of it.
|
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2022-12-22T19:53:59Z you will need to turn of formatting in this cell: https://docs.pymc.io/en/latest/contributing/jupyter_style.html#pre-commit-and-code-formatting gbrunkhorst commented on 2022-12-27T20:31:50Z formatting turned off in next pull request. |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2022-12-22T19:54:00Z Line #6. elif SMC==True: this part seems to never be used gbrunkhorst commented on 2022-12-27T20:38:38Z Good catch, in fact none of the control flow logic is used in the final version of the notebook, only the
|
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2022-12-22T19:54:01Z I think if you add gbrunkhorst commented on 2022-12-27T22:57:33Z Agree it is busy to repeat. az.labels.NoVarLabeller() gave busy "None" text, so I cleaned it up with a few lines of matplotlib code to address the comment. gbrunkhorst commented on 2023-01-12T17:30:08Z Note, we both seem to be on Arviz 0.14 - I'm not sure why |
thanks @OriolAbril I'll make changes in the next week or so. |
All comments addressed and will be reflected in the next pull request. Bullet for delta revised to: * Hopefully this is accurate. View entire conversation on ReviewNB |
Comment addressed (in the next pull request). Going back to the reference in the Stan example, the units are actually 1000 pelts. View entire conversation on ReviewNB |
Per my previous comment, View entire conversation on ReviewNB |
Revised for next pull request. View entire conversation on ReviewNB |
1 similar comment
Revised for next pull request. View entire conversation on ReviewNB |
It was on it's own line, but I added two spaces to the previous line - I hope this takes care of it.
View entire conversation on ReviewNB |
formatting turned off in next pull request. View entire conversation on ReviewNB |
Good catch, in fact none of the control flow logic is used in the final version of the notebook, only the
View entire conversation on ReviewNB |
Agree it is busy to repeat. az.labels.NoVarLabeller() gave busy "None" text, so I cleaned it up with a few lines of matplotlib code to address the comment. View entire conversation on ReviewNB |
OK - I tried again and pushed changes that include the myst.md file. Let me know if you can see the second push. The issue was, I think, that the first cell was raw rather than markdown. Let me know if this works! Thanks! View entire conversation on ReviewNB |
View / edit / reply to this conversation on ReviewNB drbenvincent commented on 2022-12-28T13:58:02Z The :author: component should only include the authors. The adaptation information goes just in the author block at the end of the notebook, see https://docs.pymc.io/en/latest/contributing/jupyter_style.html#authorship-and-attribution. See here for info abut the first block https://docs.pymc.io/en/latest/contributing/jupyter_style.html#first-cell OriolAbril commented on 2022-12-28T21:42:32Z Also, gbrunkhorst commented on 2022-12-29T18:33:41Z Revised to name myself as author. Everything here is derived from somewhere, but the outline/approach (and 90% of the code and text) are original. Let me know if there are issues with that.
Removed :type: |
View / edit / reply to this conversation on ReviewNB drbenvincent commented on 2022-12-28T13:58:03Z Ideally switch to using gbrunkhorst commented on 2022-12-29T18:33:38Z
~\.conda\envs\pymc-dev\Lib\site-packages\pytensor\scan\scan_perform_ext.py
for ModuleNotFoundError: No module named 'scan_perform' and for ImportError: Scan code version mismatch
the there is another exception and a big long CompileError for each.
Let me know if you have thoughts - maybe this is getting worked on elsewhere? gbrunkhorst commented on 2023-01-12T16:02:55Z I had to reinstall c++ on my windows machine when I switched from aesara to pytensor. notebook currently running on PyMCv5 and Pytensor |
View / edit / reply to this conversation on ReviewNB drbenvincent commented on 2022-12-28T13:58:05Z remove empty cell gbrunkhorst commented on 2022-12-29T18:50:03Z removed |
Also, View entire conversation on ReviewNB |
what ArviZ version are you using? I regularly use |
Ok, thank you for investigating this! Let's keep it like this then. View entire conversation on ReviewNB |
Thank you for the changes and yes, I think that this formulation is accurate enough. View entire conversation on ReviewNB |
Updated and revised globally.
View entire conversation on ReviewNB |
Revised to name myself as author. Everything here is derived from somewhere, but the outline/approach (and 90% of the code and text) are original. Let me know if there are issues with that.
Removed :type: View entire conversation on ReviewNB |
removed View entire conversation on ReviewNB |
I had to reinstall c++ on my windows machine when I switched from aesara to pytensor. notebook currently running on PyMCv5 and Pytensor View entire conversation on ReviewNB |
Note, we both seem to be on Arviz 0.14 - I'm not sure why View entire conversation on ReviewNB |
@OriolAbril I believe that the notebook is ready for the third round of checks. Let me know if there are other fixes. Then, we can discuss what to do about the other ODE example notebooks. |
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.
Thanks! I am reviewing on the myst file, but edit the jupyter notebook with the changes and then run pre-commit. If you edit the myst file you'll lose the changes
+++ | ||
|
||
## Authors | ||
Organized and rewritten by Greg Brunkhorst from multiple PyMC.io example notebooks by Sanmitra Ghosh, Demetri Pananos, and the PyMC Team. |
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 links to the reference pages?
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 discuss. I think 2 of the 3 referenced notebooks are obsolete and should probably be removed or heavily edited for the sake of future users. For now, I'll cross reference the one that should stay. More details:
-
https://www.pymc.io/projects/examples/en/latest/ode_models/ODE_with_manual_gradients.html
Suggest removing. This was a helpful notebook, but the method it shows is what pymc.ode uses under the hood, so it is redundant with later work. Also, it doesn't use autodifferentiation. The cutting edge is likely sunode or diffrax (or DifferentialEquations.jl). The part of this notebook that I think would be helpful to users is a short presentation of the second ODE example solved with DEMetropolis. -
https://www.pymc.io/projects/examples/en/latest/ode_models/ODE_API_introduction.html
Suggest removing. In my new notebook, the pymc.ode module was much much slower than other methods and difficult to use. Considering the innovations since the 2019 summer of code, we probably do not want to focus on pymc.ode. The part of this notebook that I think would be helpful to users is a short presentation of the second ODE example (SIR Model) solved with DEMetropolis. -
https://www.pymc.io/projects/examples/en/latest/samplers/SMC-ABC_Lotka-Volterra_example.html
This notebook has been updated and can be referenced using the sphinx cross-referencing format.
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.
sounds good, can you open an issue to remove these two notebooks? I'll share it with the rest of the team, specially people more involved with ode related development so they can join the discussion.
@OriolAbril thanks for the reviews. The latest is pushed. I checked the preview and for some reason a bunch of figures are not showing (just a path to a .....png file.) Weird. The figures are showing on my end. I'm not sure if you have seen this before. Anyway, let me know if there are other comments and I can run the notebook again with other changes. |
I see the images in the preview, might be a cache issue |
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.
left one last comment, you'll need to rerun the whole notebook sequentially too before merging (i.e. using restart and run all)
@OriolAbril thanks for the reviews - hopefully we are close! I inadvertently pushed files related to "ODE_with_manual_gradients.ipynb" by a mistake. I tried to delete them, hopefully this worked. The "ODE_Lotka_Volterra_multiple_ways.ipynb" notebook and paired ".myst.md" file are the correct ones. Sorry for the confusion. Also, note that I want to change the number of chains in the DEMetropolis sampler to be consistent with the documention. So there will be at least one more push. |
Haven't forgotten about this, but I'll need to check this out locally to try and figure out why there are git conflicts and this needs a good window to sit down which hasn't happened yet. |
No problem - let me know what you find and if I can help on my end for this or future notebooks. |
…ating based on the current state of the pymc examples
4f95fc9
to
3cf2825
Compare
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.
Looks like I managed to fix the git conflicts
…ating based on the current state of the pymc examples
{Insert Description}
Helpful links