[Repo Assist] improve(gcm): export missing public symbols from dowhy.gcm - #1724
Draft
github-actions[bot] wants to merge 1 commit into
Draft
Conversation
Four symbols are documented, tested, and used by name in docstrings or
user-facing docs but were absent from dowhy/gcm/__init__.py, forcing
users to reach into sub-modules directly:
* RankBasedAnomalyScorer – mentioned by name in MedianCDFQuantileScorer
docstring as a 'more rigorous' alternative;
tests already import from dowhy.gcm.anomaly_scorers
* conditional_anomaly_scores – a useful building block of anomaly_scores();
tests already import from dowhy.gcm.anomaly
* arrow_strength_of_model – per-mechanism companion to arrow_strength();
used in confidence_intervals.py docstring example
and in tests
* intrinsic_causal_influence_sample – sample-level companion to
intrinsic_causal_influence(); fully documented
and tested, but not reachable from dowhy.gcm
All four symbols are now exported via dowhy/gcm/__init__.py.
No logic changes; tests unchanged (all 32 pass).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This was referenced Jul 31, 2026
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.
🤖 This is an automated PR from Repo Assist, an AI assistant for this repository.
Summary
Four public GCM symbols have comprehensive docstrings and are tested, but are not accessible via
import dowhy.gcm— forcing users to reach into internal sub-modules.RankBasedAnomalyScorerdowhy.gcm.anomaly_scorersMedianCDFQuantileScorerdocstring as "a statistically more rigorous alternative" — users expect to find it next to the other scorersconditional_anomaly_scoresdowhy.gcm.anomalyanomaly_scores(); used in tests viafrom dowhy.gcm.anomaly import ...arrow_strength_of_modeldowhy.gcm.influencearrow_strength(); appears in theconfidence_intervals.pydocstring example (direct_arrow_strength_of_model) and is testedintrinsic_causal_influence_sampledowhy.gcm.influenceintrinsic_causal_influence(), fully documented with a research paper reference and testedChange
Single file changed —
dowhy/gcm/__init__.py:conditional_anomaly_scoresto the.anomalyimport lineRankBasedAnomalyScorerto the.anomaly_scorersblockarrow_strength_of_modelandintrinsic_causal_influence_sampleto the.influenceblockNo logic changes anywhere.
Test Status
Tests run:
test_anomaly_scorers.py,test_anomaly.py,test_arrow_strength.py,test_intrinsic_influence.pyFormat: ✅
poe format_checkpassesLint: ✅
poe lintpasses (no new issues)