Skip to content

Update example notebooks for better rendering #394

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

Open
13 of 16 tasks
reshamas opened this issue Jul 9, 2022 · 5 comments
Open
13 of 16 tasks

Update example notebooks for better rendering #394

reshamas opened this issue Jul 9, 2022 · 5 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@reshamas
Copy link
Member

reshamas commented Jul 9, 2022

NOTE

This issue is reserved for the #DataUmbrellaPyMCSprint

References

List of PyMC Example Notebooks that Need to be Updated

examples/case_studies

KeyError: "Dimensions {'obs'} are unknown to the model and cannot be used to specify a `shape`."

examples/diagnostics_and_criticism

examples/generalized_linear_models

ImportError: This function requires the python library graphviz, along with binaries. The easiest way to install all of this is by running

	conda install -c conda-forge python-graphviz
TypeError: You are calling an Aesara function with PyTensor variables.
Starting with PyMC 5.0, Aesara was replaced by PyTensor (see https://www.pymc.io/blog/pytensor_announcement.html).
Replace your import of aesara.tensor with pytensor.tensor.

examples/howto

examples/survival_analysis

Set-up Instructions

  1. Fork and clone this repository; set upstream remote, etc.
  2. A virtual environment should be set up and the packages in requirements.txt should be installed.
  3. Use a feature branch git checkout -b nb_feature_branch
  4. Reminder: sync the repo

Notes for Updating Notebook

  1. Update First Cell.
  2. For tags, see options in current notebook tags
  3. Update Last Cell.
  4. Optional: Go through Jupyter style guide and make other updates.
  5. For authorship of notebooks, we can search in the "pymc" repo pymc closed pull requests.
  6. Check that all links work in the notebook
  7. Replace mentions of "PyMC3" to "PyMC"
  8. Watermark: Add a Markdown cell for ## Watermark
  9. References can be found in examples/references.bib
  10. REMINDER: Rerun full notebook before submitting a PR or creating the myst file.
  11. Run pre-commit (pre-commit run --all)
  12. Example of description text for PR: Notebook divergence, update header and footer #402

References

Note: pymc-examples#8

* Moved from pymc to pymc-examples repo in December 2020 ([pymc-examples#8](https://github.com/pymc-devs/pymc-examples/pull/8))

Examples of references

Example 1: [ArviZ's naming convention](https://arviz-devs.github.io/arviz/schema/schema.html#sample-stats)

{ref}`ArviZ's naming convention <arviz:schema>`

Example 2: [check this page](https://docs.pymc.io/api/inference.html#module-pymc3.step_methods.hmc.nuts)

{class}`pymc.NUTS`

FAQs

Syncing Repo (via @symeneses)

# update you main branch
git checkout main
git fetch upstream
git rebase upstream/main

# update your branch
git checkout feature
git rebase origin/main

Running pre-commit

(Sandra notes)

  • Stage the notebook (git commit -m 'message')
  • Run pre-commit, this will create the .myst file (pre-commit run --all)
  • git status ==> you will now see a .myst file created
  • Stage the .myst file (git commit -am 'adding myst file')
  • Run pre-commit and tests should now pass (pre-commit run --all)
  • Push changes: git push origin branch_name

There already is a "I will work on this" comment on the issue

If the issue is more than 3 months old, you can ignore that message and comment yourself you plan to work on that issue.

@reshamas reshamas added the proposal New notebook proposal still up for discussion label Jul 9, 2022
@reshamas
Copy link
Member Author

reshamas commented Jul 9, 2022

@OriolAbril OriolAbril changed the title Update example notebooks for better rendering from v3 to v4 of PyMC Update example notebooks for better rendering Jul 11, 2022
@OriolAbril
Copy link
Member

Updated the title as the task is about updating the markdown content and metadata, without rerunning the notebook.

The issue to update the notebooks from v3 to v4 is #333. The two tasks are independent and can be done sequentially or together... hoping to avoid confusion about the scope of the issue.

@OriolAbril OriolAbril added good first issue Good for newcomers help wanted Extra attention is needed and removed proposal New notebook proposal still up for discussion labels Jul 11, 2022
@jlindbloom
Copy link

@symeneses
Copy link
Contributor

I am working on the notebook updating_priors. Waiting for the issue pymc-devs/pymc#5959 to be solved.

@reshamas
Copy link
Member Author

I am working on: examples/diagnostics_and_criticism/Diagnosing_biased_Inference_with_Divergences.ipynb

@jlindbloom
I didn't notice you were working on this. Sorry! I submitted a PR on this one, #402

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants