Skip to content

Remove size from Distribution signatures #5788

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

Merged
merged 4 commits into from
May 23, 2022
Merged

Remove size from Distribution signatures #5788

merged 4 commits into from
May 23, 2022

Conversation

michaelosthege
Copy link
Member

This PR implements how I propose to resolve #5754.

It kicks the argument from the signature, but continues to support it for internal use & to maintain API continuity with Aesara & aeppl.

I made the corresponding changes for Flat, HalfFlat, but I don't know how to go about Bound which has multiple other kwargs from the Distribution API in it's signature.
Also the GaussianRandomWalk has a size kwarg that I wasn't sure how to remove without having to starting thinking.

Anybody please feel free to take over the branch.

@codecov
Copy link

codecov bot commented May 20, 2022

Codecov Report

Merging #5788 (a5e6a34) into main (b91283e) will increase coverage by 2.62%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5788      +/-   ##
==========================================
+ Coverage   86.73%   89.36%   +2.62%     
==========================================
  Files          74       74              
  Lines       13815    13805      -10     
==========================================
+ Hits        11983    12337     +354     
+ Misses       1832     1468     -364     
Impacted Files Coverage Δ
pymc/distributions/continuous.py 97.98% <100.00%> (ø)
pymc/distributions/distribution.py 90.24% <100.00%> (+0.03%) ⬆️
pymc/data.py 81.63% <0.00%> (-1.99%) ⬇️
pymc/step_methods/hmc/base_hmc.py 89.68% <0.00%> (-0.80%) ⬇️
pymc/distributions/censored.py 94.73% <0.00%> (ø)
pymc/step_methods/metropolis.py 82.97% <0.00%> (+0.42%) ⬆️
pymc/model.py 86.82% <0.00%> (+0.44%) ⬆️
pymc/backends/report.py 91.04% <0.00%> (+0.74%) ⬆️
pymc/model_graph.py 93.60% <0.00%> (+8.08%) ⬆️
pymc/distributions/simulator.py 87.50% <0.00%> (+40.97%) ⬆️
... and 2 more

@canyon289
Copy link
Member

canyon289 commented May 20, 2022

Thanks @michaelosthege for taking action! The code here looks good to me, will let others comment on the "philosophy of it"

@twiecki
Copy link
Member

twiecki commented May 20, 2022

Related to #5789

@michaelosthege michaelosthege requested a review from ricardoV94 May 20, 2022 21:04
michaelosthege and others added 2 commits May 23, 2022 10:37
@michaelosthege
Copy link
Member Author

@lucianopaz @ricardoV94 @twiecki @canyon289 are we happy?

(Want to get the ticket off my mental ToDo list..)

@ricardoV94
Copy link
Member

I am okay. This does not really address the bigger discussion, but we can definitely merge.

@twiecki twiecki merged commit b5a5b56 into main May 23, 2022
@twiecki twiecki deleted the remove-size branch May 23, 2022 13:49
@canyon289
Copy link
Member

canyon289 commented May 23, 2022 via email

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.

Remove size from distribution API
5 participants