Repository navigation
Replace skipped sample-as-parent failure test for variational_gamma with a passing test - #520
Merged
Merged
Conversation
Co-authored-by: hyanwong <4699014+hyanwong@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix sample_as_parent handling in variational_gamma implementation
Replace skipped sample-as-parent failure test for variational_gamma with a passing test
Oct 28, 2026
hyanwong
marked this pull request as ready for review
October 28, 2026 17:25
Member
|
This LGTM. The functionality was added in #433 (there is a lot of discussion and some more test cases there) |
hyanwong
approved these changes
Oct 28, 2026
hyanwong
left a comment
Member
There was a problem hiding this comment.
This just reactivates a test that should now pass, and is uncontroversial
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A test for
variational_gammawas skipped pending a decision on whether it should raiseNotImplementedErrorwhen a sample has undated descendant nodes. The EP machinery turns out to handle this case already, so no error is needed.tests/test_functions.py)test_variational_gamma_sample_as_parent_fails.test_variational_gamma_sample_as_parent. It adds a mutation tosingle_tree_ts_n3_sample_as_parent(), because the fixture has none andvariational_gammarequires mutations. It then checks that sample ages are unchanged after dating.TestInternalConstraints::test_with_unary_internal_samplesandtest_with_nonunary_internal_samples. Both already date internal samples throughdate().Review notes:
rescaling_intervals=1. With the default, this three-sample fixture fails withAssertionError: Use fewer rescaling intervals. That is a limit of piecewise rescaling on a tiny tree, not a sample-as-parent problem, and I didn't change it.