Skip to content
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

Rethink2 to pymc v5 #234

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open

Conversation

yahrMason
Copy link
Contributor

@yahrMason yahrMason commented Jan 6, 2024

Rethinking_2 Conversion to PyMC v5+

I am working on updating the Rethinking_2 notebooks to the current version of PyMC + Pytensor. The changes I am making are:

  • updating the environment yml and Readme
  • changing the causalgraphicalmodels dependency to this updated repo as the original is no longer maintained and is not compatible with current python versions: https://github.com/BirkhoffG/causalgraphicalmodels/tree/master
  • replace all theano/aesara references with pytensor
  • adopt modern arviz naming conventions (ie idata as opposed to trace)
  • use coords to manage model dimensions
  • make sure all notebooks run with current versions of PyMC/Pytensor/Arviz

I made an initial pass through the notebooks and changed all aesara/theano refs to pytensor, and changed the names of all inference data objects to the standard idata convention. Now I need to go through the notebooks and execute them and make sure that they run properly. The following list tracks my progress. Anyone feel free to clone my branch and make edits/updates.

To Do:

  • Update Readme and yml
  • Add missing data sets
  • Add notes about coords and idata_kwargs={"log_likelihood": True}
  • Chapter 2 Notebook
  • Chapter 3 Notebook
  • Chapter 4 Notebook
  • Chapter 5 Notebook
  • Chapter 6 Notebook
  • Chapter 7 Notebook
  • Chapter 8 Notebook
  • Chapter 9 Notebook
  • Chapter 10 Notebook
  • Chapter 11 Notebook
  • Chapter 12 Notebook
  • Chapter 13 Notebook
  • Chapter 14 Notebook
  • Chapter 15 Notebook
  • Chapter 16 Notebook

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@yahrMason
Copy link
Contributor Author

yahrMason commented Jan 6, 2024

pre-commit is passing locally. Not sure what's causing the issue.

@twiecki
Copy link
Member

twiecki commented Jan 7, 2024

Amazing effort!

@twiecki
Copy link
Member

twiecki commented Jan 7, 2024

The pre-commit looks to be a version problem maybe.

@twiecki twiecki mentioned this pull request Jan 7, 2024
@maresb maresb mentioned this pull request Jan 7, 2024
@twiecki
Copy link
Member

twiecki commented Jan 7, 2024

@yahrMason Can you rebase? should fix pre-commit issues.

@yahrMason
Copy link
Contributor Author

@twiecki ah yep, that solved it. Thanks for that.

@twiecki twiecki requested review from fonnesbeck and cluhmann January 8, 2024 03:45
@twiecki
Copy link
Member

twiecki commented Jan 8, 2024

I think @cluhmann had started on a conversion as well, so maybe he can take a look.

@yahrMason
Copy link
Contributor Author

This will also close #192 and #225

@yahrMason yahrMason marked this pull request as draft January 10, 2024 03:29
@yahrMason yahrMason marked this pull request as ready for review January 14, 2024 02:56
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.

2 participants