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

Merge redundant code across logprob, pytensorf and distributions/transform #6976

Merged
merged 6 commits into from
Nov 18, 2023

Conversation

ricardoV94
Copy link
Member

@ricardoV94 ricardoV94 commented Oct 30, 2023

Helps with #6908
Closes #6859

Also gets rid of some annoying circular imports


📚 Documentation preview 📚: https://pymc--6976.org.readthedocs.build/en/6976/

@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

Merging #6976 (322b3d3) into main (ad450a6) will decrease coverage by 7.54%.
The diff coverage is 96.02%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6976      +/-   ##
==========================================
- Coverage   87.66%   80.12%   -7.54%     
==========================================
  Files         101      101              
  Lines       16964    16858     -106     
==========================================
- Hits        14871    13507    -1364     
- Misses       2093     3351    +1258     
Files Coverage Δ
pymc/gp/cov.py 98.00% <100.00%> (ø)
pymc/gp/util.py 96.47% <100.00%> (+0.04%) ⬆️
pymc/initial_point.py 94.05% <100.00%> (-5.95%) ⬇️
pymc/logprob/basic.py 79.57% <100.00%> (-6.95%) ⬇️
pymc/logprob/checks.py 45.83% <100.00%> (+2.08%) ⬆️
pymc/logprob/mixture.py 24.33% <100.00%> (-4.62%) ⬇️
pymc/logprob/scan.py 18.09% <100.00%> (-73.37%) ⬇️
pymc/logprob/tensor.py 50.43% <100.00%> (+0.43%) ⬆️
pymc/logprob/transform_value.py 73.75% <100.00%> (ø)
pymc/logprob/transforms.py 55.74% <100.00%> (-12.01%) ⬇️
... and 7 more

... and 30 files with indirect coverage changes

@ricardoV94 ricardoV94 force-pushed the fix_circular_imports branch 5 times, most recently from d87a82a to 468e043 Compare October 31, 2023 10:35
@ricardoV94 ricardoV94 marked this pull request as draft November 8, 2023 09:25
@ricardoV94
Copy link
Member Author

Converted to draft as there are two bugfix PRs that involve transforms and will certainly conflict with this one

@ricardoV94 ricardoV94 marked this pull request as ready for review November 14, 2023 09:02
@ricardoV94
Copy link
Member Author

ricardoV94 commented Nov 14, 2023

Ready for review again.

I am still divided about what to do with the custom Transforms implemented in distributions/transforms.py so I am leaving them there for now. I am not sure where they should live, if there or in logprob/transforms.py or perhaps logprob/transform_value.py?

I am more inclined for the latter, but for now I just removed duplicated functionality (Chain vs ChainedTransform) and left everything in the same place.

@ricardoV94 ricardoV94 merged commit 547bcb4 into pymc-devs:main Nov 18, 2023
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Combine walk_model helper functions in the codebase?
2 participants