test: comprehensive causal_prediction tests with synthetic data and PR #1371 regression coverage#1654
Open
emrekiciman with Copilot wants to merge 3 commits into
Open
test: comprehensive causal_prediction tests with synthetic data and PR #1371 regression coverage#1654emrekiciman with Copilot wants to merge 3 commits into
emrekiciman with Copilot wants to merge 3 commits into
Conversation
…nd PR #1371 regression coverage Co-authored-by: emrekiciman <5982160+emrekiciman@users.noreply.github.com>
…fixtures Co-authored-by: emrekiciman <5982160+emrekiciman@users.noreply.github.com>
…ssage, and momentum clarity Co-authored-by: emrekiciman <5982160+emrekiciman@users.noreply.github.com>
Copilot
AI
changed the title
test: add comprehensive causal_prediction tests with synthetic data and PR #1371 regression coverage
test: comprehensive causal_prediction tests with synthetic data and PR #1371 regression coverage
Jul 7, 2026
Copilot created this pull request from a session on behalf of
emrekiciman
July 7, 2026 07:09
View session
56 tasks
emrekiciman
marked this pull request as ready for review
July 13, 2026 21:25
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.
The existing
causal_predictiontest suite had 14 mostly structural tests with no coverage of the core regularization logic, CACM training, or the bugs fixed in PR #1371. This PR expands coverage to 51 tests using synthetic tensors.Shared fixtures
gaussian_reg— pre-builtRegularizer(E_conditioned=True, gaussian, gamma=1.0); auto-skips when torch absenttiny_dataset_factory— factory fortorch.utils.data.Datasetinteger sequencesNew coverage
_split_by_attribute— two-label split, single-label passthrough, three-label_optimized_mmd_penalty— correctness vs. naive for gaussian (2- and 3-tensor) and linear kernels; empty-tensor skip; float64 small-gamma precisionunconditional_reg— all four branches (E_eq_A × E_conditioned), both optimization modes_compute_conditional_penalty— positive/zero penalty cases, value-based grouping, optimization equivalenceconditional_reg— all branches, optimization equivalence, cross-env mergingattr_types=None/E_eq_A=Nonedefaults, no mutable-default aliasing,training_stepwith all attr typesconfigure_optimizersreturn typetraining_stepwith synthetic datasplit_datasetsize, reproducibility, seed sensitivityPR #1371 regression tests
test_compute_conditional_penalty_value_based_groupingtest_unconditional_reg_not_e_conditioned_same_attr_gives_no_penaltytest_conditional_reg_not_e_conditioned_cross_env_mergingconditional_regtest_cacm_e_eq_a_none_does_not_raiseattr_type_idx in NoneraisedTypeErrorwith oldE_eq_A=[]defaulttest_optimized_mmd_penalty_fp64_precision_small_gamma