-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Port Dirichlet Multinomial to v4 #4758
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
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 for opening up the PR! I left some comments in case it helps figuring things out. Multivariate distributions are a bit of PITA :/
This is ready for review and merge @ricardoV94 -- thanks a lot for your help 🍾 |
I think you will have to make another PR or clean the git history to fix the commit issues |
Looks like you rebased with some weird settings that preserved the chronological order of commits? |
It looks like this branch wasn't rebased onto Also, there's no need to create a new branch/PR, especially since that could easily involve much more work. If you rebase onto |
I just performed the rebase locally and checked out only "our" changes on each conflict; the result has an empty diff when compared with this upstream branch (i.e. the aforementioned rebase onto I can push this rebase if you'd like. |
Ah yes that'd be great, thanks @brandonwillard ! Tell me if I need to do anything else |
97fa5a6
to
dd608fc
Compare
Magic 🧙♂️ Thanks @brandonwillard ! |
Your pre-commit seems to have changed a lot of lines that were not related to the PR, which makes it difficult to review the changes. Having an explicit comma after the last item in a multi-line call / tuple prevents it from auto-collapsing everything into a single line. |
WHy do you want to prevent it from being on a single line if it's passing black? |
These lines are likely to cause git conflicts, because the same files are edited in other PRs as well. I don't understand why this happened in the first place though. Apart from that (and the git conflict which looks reasonably easy to fix) how far away from the finish line is this PR ? |
Besides what @michaelosthege said, it's an issue that this was an accidental change. The next person could come around and introduce the multiline fomat again (which also passes black) and we would go back and forth over time without need, just complicating reviews and the git history. For example most of the same tests in those files keep the multiline format. If we want one style over the other it should be enforced automatically (and consistently). Also, I think these multilines are easier to read than the collapsed format, since most don't use kwargs. |
Yeah me neither, I didn't change anything manually -- formatting was done automatically by pre-commit locally.
It's done @michaelosthege. Once tests pass and conflicts are resolved, it can be merged.
I agree with all that. I just don't know how these changes appeared in the first place. If they were introduced by pre-commit, it seems to me there is a low chance they'll be changed again in a further PR. |
I don't know either. But looking at the black github, many issues seem related to this type of trailing commas... |
Codecov Report
@@ Coverage Diff @@
## main #4758 +/- ##
===========================================
- Coverage 71.97% 61.63% -10.35%
===========================================
Files 85 85
Lines 13839 13843 +4
===========================================
- Hits 9961 8532 -1429
- Misses 3878 5311 +1433
|
5569839
to
532d869
Compare
I cleaned up the history and force-pushed here. Checking if the tests pass or if I screwed up something |
Wasn't the history already cleaned by Brandon? |
I reverted the accidental formatting issues |
Thanks @AlexAndorra this one was tough! :) |
See #4686
RV op
by inheriting from aesaraRandomVariable
, porting the code in the oldrandom
method to therng_fn
classmethod
of the newRandomVariable
.RandomVariable
to therv_op
field in the respective PyMC3 distribution.__init__
to the newdist
classmethod
logp
andlogcdf
to expect arguments in this order:value, arg1, arg2, ... argn
test_distributions.py
test_distributions_random.py
and remove oldBaseTestCase
in that file.