DoWhy is a Python library for causal inference that supports explicit modeling and testing of causal assumptions. DoWhy is based on a unified language for causal inference, combining causal graphical models and potential outcomes frameworks.
This report presents the forensic synthetic code analysis of py-why/dowhy, a Python project with 8,208 GitHub stars. SynthScan v2.0 examined 56,058 lines of code across 300 source files, recording 1205 pattern matches distributed across 19 syntactic categories. The overall adjusted score of 26.9 places this repository in the Moderate AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 1205 distinct pattern matches across 19 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test_parallel_refuters.py | 33 | "def _simulate_confounders_effect_once(" in aucc_content | CODE |
| LOW | tests/test_datasets.py | 6 | def test_when_generating_sales_dataset_then_returns_reasonable_samples(): | CODE |
| LOW | tests/test_datasets.py | 19 | def test_linear_dataset_with_binary_treatment(): | CODE |
| LOW | tests/test_datasets.py | 33 | def test_linear_dataset_with_categorical_treatment(): | CODE |
| LOW | tests/test_causal_model.py | 381 | def test_cate_estimates_regression(self, beta, num_effect_modifiers, num_samples): | STRING |
| LOW | tests/test_causal_model.py | 406 | def test_estimate_conditional_effects_public_api(self): | STRING |
| LOW | tests/test_causal_model.py | 567 | def test_unobserved_graph_variables_log_warning(self, caplog): | STRING |
| LOW | tests/test_causal_model.py | 627 | def test_compability_with_gcm(self): | STRING |
| LOW | tests/test_causal_model.py | 651 | def test_incorrect_graph_format(self): | STRING |
| LOW | tests/test_causal_model.py | 661 | def test_warn_when_treatment_not_in_data(self): | STRING |
| LOW | tests/test_causal_model.py | 672 | def test_warn_when_outcome_not_in_data(self): | CODE |
| LOW | tests/test_causal_model.py | 683 | def test_no_warn_when_treatment_and_outcome_in_data(self): | CODE |
| LOW | tests/test_causal_model.py | 700 | def test_causal_estimator_cache(self): | CODE |
| LOW | tests/test_causal_model.py | 743 | def test_refute_estimate_raises_when_method_name_is_none(self): | CODE |
| LOW | tests/test_causal_model.py | 765 | def test_do_raises_when_method_name_is_none(self): | CODE |
| LOW | tests/test_causal_model.py | 783 | def test_estimate_effect_raises_when_method_name_is_none(self): | CODE |
| LOW | tests/test_causal_model.py | 801 | def test_fit_estimator_false_reuses_cached_estimator(self): | CODE |
| LOW | tests/test_causal_model.py | 857 | def test_causal_model_do_regression(self): | CODE |
| LOW | tests/test_causal_model.py | 900 | def test_repr_matches_str_for_key_result_objects(self): | CODE |
| LOW | tests/test_data_transformer.py | 10 | def test_dimensionality_reducer_placeholder_methods(): | CODE |
| LOW | tests/test_causal_estimator.py | 13 | def test_causal_estimator_placeholder_methods(): | CODE |
| LOW | tests/test_causal_estimator.py | 30 | # def test_average_treatment_effect(self): | COMMENT |
| LOW | tests/test_causal_estimator.py | 36 | # def test_average_treatment_effect_on_treated(self): | COMMENT |
| LOW | tests/test_causal_estimator.py | 48 | def test_estimate_effect_warns_on_nan_in_treatment_or_outcome(): | CODE |
| LOW | tests/test_causal_estimator.py | 88 | def test_estimate_effect_no_warning_when_no_nan(): | CODE |
| LOW | tests/test_causal_estimator.py | 117 | def test_estimate_effect_raises_valueerror_for_missing_estimand(): | CODE |
| LOW | tests/test_confounder_distribution_interpreter.py | 36 | def test_confounder_distribution_interpreter_with_categorical_confounder(mock_show): | CODE |
| LOW | tests/test_confounder_distribution_interpreter.py | 49 | def test_confounder_distribution_interpreter_with_integer_confounder(mock_show): | CODE |
| LOW⚡ | tests/test_causal_refuter.py | 14 | def test_causal_refuter_placeholder_method(): | CODE |
| LOW⚡ | tests/test_causal_refuter.py | 21 | def test_causal_refuter_bootstrap_test(): | CODE |
| LOW⚡ | tests/test_causal_refuter.py | 29 | def test_normal_distribution_test_zero_std_returns_one(): | CODE |
| LOW⚡ | tests/test_causal_refuter.py | 47 | def test_choose_variables_true_returns_all(): | CODE |
| LOW⚡ | tests/test_causal_refuter.py | 53 | def test_choose_variables_false_returns_none(): | CODE |
| LOW⚡ | tests/test_causal_refuter.py | 59 | def test_choose_variables_int_returns_correct_count(): | CODE |
| LOW⚡ | tests/test_causal_refuter.py | 66 | def test_choose_variables_int_zero_returns_empty(): | CODE |
| LOW⚡ | tests/test_causal_refuter.py | 72 | def test_choose_variables_int_too_large_raises(): | CODE |
| LOW⚡ | tests/test_causal_refuter.py | 78 | def test_choose_variables_list_select_returns_subset(): | CODE |
| LOW⚡ | tests/test_causal_refuter.py | 84 | def test_choose_variables_list_deselect_returns_complement(): | CODE |
| LOW⚡ | tests/test_causal_refuter.py | 90 | def test_choose_variables_list_deselect_all_returns_empty(): | CODE |
| LOW⚡ | tests/test_causal_refuter.py | 96 | def test_choose_variables_list_mixed_select_deselect_raises(): | CODE |
| LOW⚡ | tests/test_causal_refuter.py | 102 | def test_choose_variables_list_invalid_variable_raises(): | CODE |
| LOW⚡ | tests/test_causal_refuter.py | 108 | def test_choose_variables_empty_pool_true_returns_empty(): | CODE |
| LOW⚡ | tests/test_causal_refuter.py | 114 | def test_choose_variables_empty_pool_false_returns_none(): | CODE |
| LOW | tests/test_causal_graph.py | 58 | def test_check_valid_backdoor_set(self): | CODE |
| LOW | tests/test_causal_graph.py | 120 | def test_build_graph_from_str(self): | CODE |
| LOW⚡ | tests/test_causal_graph.py | 131 | def test_identify_mediation_single_mediator(): | CODE |
| LOW⚡ | tests/test_causal_graph.py | 138 | def test_identify_mediation_parallel_mediators(): | CODE |
| LOW⚡ | tests/test_causal_graph.py | 148 | def test_identify_mediation_no_mediator(): | CODE |
| LOW⚡ | tests/test_causal_graph.py | 155 | def test_nie_with_parallel_mediators(): | CODE |
| LOW | tests/test_propensity_balance_interpreter.py | 58 | def test_interpreter_with_standard_covariate_names(self): | CODE |
| LOW | tests/test_propensity_balance_interpreter.py | 66 | def test_interpreter_with_arbitrary_covariate_names(self): | CODE |
| LOW⚡ | tests/test_propensity_balance_interpreter.py | 78 | def test_interpreter_returns_dataframe(self): | CODE |
| LOW⚡ | tests/test_propensity_balance_interpreter.py | 87 | def test_interpreter_with_snake_case_method_name(self): | CODE |
| LOW⚡ | tests/test_propensity_balance_interpreter.py | 93 | def test_interpreter_with_multiple_method_names_returns_list(self): | CODE |
| LOW | …/causal_estimators/test_linear_regression_estimator.py | 151 | def test_average_treatment_effect( | CODE |
| LOW | …/causal_estimators/test_linear_regression_estimator.py | 182 | def test_general_adjustment_estimation_on_example_graphs(self, example_graph: TestGraphObject): | CODE |
| LOW | …/causal_estimators/test_linear_regression_estimator.py | 195 | def test_none_identifier_method_does_not_raise(self): | CODE |
| LOW | …/causal_estimators/test_linear_regression_estimator.py | 217 | def test_test_significance_returns_scalar_float_for_single_treatment(self): | CODE |
| LOW | …/causal_estimators/test_linear_regression_estimator.py | 249 | def test_test_significance_returns_array_for_multiple_treatments(self): | CODE |
| LOW | …/causal_estimators/test_linear_regression_estimator.py | 279 | def test_invalid_identifier_method_raises(self, invalid_method): | CODE |
| 700 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | dowhy/causal_estimators/econml.py | 0 | :param identified_estimand: probability expression representing the target identified estimand to estimate. :param test_ | STRING |
| HIGH | …sal_estimators/propensity_score_weighting_estimator.py | 0 | :param identified_estimand: probability expression representing the target identified estimand to estimate. :param test_ | STRING |
| HIGH | …hy/causal_estimators/two_stage_regression_estimator.py | 0 | :param identified_estimand: probability expression representing the target identified estimand to estimate. :param test_ | STRING |
| HIGH | …ausal_estimators/regression_discontinuity_estimator.py | 0 | :param identified_estimand: probability expression representing the target identified estimand to estimate. :param test_ | STRING |
| HIGH | …usal_estimators/propensity_score_matching_estimator.py | 0 | :param identified_estimand: probability expression representing the target identified estimand to estimate. :param test_ | STRING |
| HIGH | dowhy/causal_estimators/propensity_score_estimator.py | 0 | :param identified_estimand: probability expression representing the target identified estimand to estimate. :param test_ | STRING |
| HIGH | dowhy/causal_estimators/linear_regression_estimator.py | 0 | :param identified_estimand: probability expression representing the target identified estimand to estimate. :param test_ | STRING |
| HIGH | dowhy/causal_estimators/regression_estimator.py | 0 | :param identified_estimand: probability expression representing the target identified estimand to estimate. :param test_ | STRING |
| HIGH | dowhy/causal_estimators/causalml.py | 0 | :param identified_estimand: probability expression representing the target identified estimand to estimate. :param test_ | STRING |
| HIGH | …y/causal_estimators/instrumental_variable_estimator.py | 0 | :param identified_estimand: probability expression representing the target identified estimand to estimate. :param test_ | STRING |
| HIGH | dowhy/causal_estimators/distance_matching_estimator.py | 0 | :param identified_estimand: probability expression representing the target identified estimand to estimate. :param test_ | STRING |
| HIGH | …stimators/propensity_score_stratification_estimator.py | 0 | :param identified_estimand: probability expression representing the target identified estimand to estimate. :param test_ | STRING |
| HIGH | dowhy/causal_estimators/doubly_robust_estimator.py | 0 | :param identified_estimand: probability expression representing the target identified estimand to estimate. :param test_ | STRING |
| HIGH | dowhy/causal_estimators/econml.py | 0 | fits the estimator with data for effect estimation :param data: data frame containing the data :param treatment: name of | STRING |
| HIGH | dowhy/causal_estimators/tabpfn_estimator.py | 0 | fits the estimator with data for effect estimation :param data: data frame containing the data :param treatment: name of | STRING |
| HIGH | …sal_estimators/propensity_score_weighting_estimator.py | 0 | fits the estimator with data for effect estimation :param data: data frame containing the data :param treatment: name of | STRING |
| HIGH | …ausal_estimators/regression_discontinuity_estimator.py | 0 | fits the estimator with data for effect estimation :param data: data frame containing the data :param treatment: name of | STRING |
| HIGH | …usal_estimators/propensity_score_matching_estimator.py | 0 | fits the estimator with data for effect estimation :param data: data frame containing the data :param treatment: name of | STRING |
| HIGH | dowhy/causal_estimators/linear_regression_estimator.py | 0 | fits the estimator with data for effect estimation :param data: data frame containing the data :param treatment: name of | STRING |
| HIGH | dowhy/causal_estimators/causalml.py | 0 | fits the estimator with data for effect estimation :param data: data frame containing the data :param treatment: name of | STRING |
| HIGH | …y/causal_estimators/instrumental_variable_estimator.py | 0 | fits the estimator with data for effect estimation :param data: data frame containing the data :param treatment: name of | STRING |
| HIGH | …ausal_estimators/generalized_linear_model_estimator.py | 0 | fits the estimator with data for effect estimation :param data: data frame containing the data :param treatment: name of | STRING |
| HIGH | …stimators/propensity_score_stratification_estimator.py | 0 | fits the estimator with data for effect estimation :param data: data frame containing the data :param treatment: name of | STRING |
| HIGH | dowhy/causal_estimators/regression_estimator.py | 0 | fits the estimator with data for effect estimation :param data: data frame containing the data :param treatment: name of | STRING |
| HIGH | dowhy/causal_estimators/econml.py | 0 | data: dataframe containing the data on which treatment effect is to be estimated. treatment_value: value of the treatmen | STRING |
| HIGH | dowhy/causal_estimators/causalml.py | 0 | data: dataframe containing the data on which treatment effect is to be estimated. treatment_value: value of the treatmen | STRING |
| HIGH | …y/causal_estimators/instrumental_variable_estimator.py | 0 | data: dataframe containing the data on which treatment effect is to be estimated. treatment_value: value of the treatmen | STRING |
| HIGH | dowhy/causal_refuters/overrule/ruleset.py | 0 | overlapbooleanrule. this module implements the boolean ruleset estimator from overrule [1]. code is adapted (with some s | STRING |
| HIGH | dowhy/causal_refuters/overrule/utils.py | 0 | overlapbooleanrule. this module implements the boolean ruleset estimator from overrule [1]. code is adapted (with some s | STRING |
| HIGH | …/causal_refuters/overrule/BCS/load_process_data_BCS.py | 0 | overlapbooleanrule. this module implements the boolean ruleset estimator from overrule [1]. code is adapted (with some s | STRING |
| HIGH | dowhy/causal_refuters/overrule/BCS/beam_search.py | 0 | overlapbooleanrule. this module implements the boolean ruleset estimator from overrule [1]. code is adapted (with some s | STRING |
| HIGH | …y/causal_refuters/overrule/BCS/overlap_boolean_rule.py | 0 | overlapbooleanrule. this module implements the boolean ruleset estimator from overrule [1]. code is adapted (with some s | STRING |
| HIGH | dowhy/graph_learners/ges.py | 0 | discover causal graph and return the graph in dot format. | STRING |
| HIGH | dowhy/graph_learners/cdt.py | 0 | discover causal graph and return the graph in dot format. | STRING |
| HIGH | dowhy/graph_learners/lingam.py | 0 | discover causal graph and return the graph in dot format. | STRING |
| HIGH | dowhy/utils/dgps/quadratic_dgp.py | 0 | implements a data generating process that returns data having linear relationship between the treatment, outcome and con | STRING |
| HIGH | dowhy/utils/dgps/cubic_dgp.py | 0 | implements a data generating process that returns data having linear relationship between the treatment, outcome and con | STRING |
| HIGH | dowhy/utils/dgps/linear_dgp.py | 0 | implements a data generating process that returns data having linear relationship between the treatment, outcome and con | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test_parallel_refuters.py | 8 | CODE | |
| LOW | tests/test_confounder_distribution_interpreter.py | 17 | CODE | |
| LOW | tests/test_causal_graph.py | 4 | CODE | |
| LOW | tests/test_causal_graph.py | 5 | CODE | |
| LOW | tests/test_causal_graph.py | 11 | CODE | |
| LOW | tests/causal_estimators/mock_external_estimator.py | 1 | CODE | |
| LOW | tests/timeseries/test_temporal_shift.py | 2 | CODE | |
| LOW | tests/timeseries/test_temporal_shift.py | 2 | CODE | |
| LOW | tests/gcm/test_anomaly.py | 24 | CODE | |
| LOW | tests/gcm/test_feature_relevance.py | 8 | CODE | |
| LOW | tests/gcm/test_model_evaluation.py | 7 | CODE | |
| LOW | tests/gcm/test_intrinsic_influence.py | 20 | CODE | |
| LOW | tests/gcm/ml/test_autogluon.py | 5 | CODE | |
| LOW | tests/utils/test_plotting.py | 8 | CODE | |
| LOW | tests/utils/test_encoding.py | 1 | CODE | |
| LOW | tests/utils/test_encoding.py | 2 | CODE | |
| LOW | …sal_identifiers/test_complete_adjustment_identifier.py | 3 | CODE | |
| LOW | tests/causal_identifiers/test_backdoor_identifier.py | 1 | CODE | |
| LOW | tests/causal_identifiers/test_frontdoor_identifier.py | 3 | CODE | |
| LOW | tests/causal_identifiers/test_frontdoor_identifier.py | 6 | CODE | |
| LOW | tests/causal_identifiers/test_frontdoor_identifier.py | 6 | CODE | |
| LOW | tests/causal_identifiers/test_frontdoor_identifier.py | 8 | CODE | |
| LOW | …discovery-book/test_causal_inference_discovery_book.py | 11 | CODE | |
| LOW | …discovery-book/test_causal_inference_discovery_book.py | 11 | CODE | |
| LOW | dowhy/__init__.py | 3 | CODE | |
| LOW | dowhy/__init__.py | 3 | CODE | |
| LOW | dowhy/__init__.py | 3 | CODE | |
| LOW | dowhy/__init__.py | 3 | CODE | |
| LOW | dowhy/__init__.py | 4 | CODE | |
| LOW | dowhy/causal_identifier/id_identifier.py | 1 | CODE | |
| LOW | dowhy/causal_identifier/__init__.py | 1 | CODE | |
| LOW | dowhy/causal_identifier/__init__.py | 1 | CODE | |
| LOW | dowhy/causal_identifier/__init__.py | 1 | CODE | |
| LOW | dowhy/causal_identifier/__init__.py | 1 | CODE | |
| LOW | dowhy/causal_identifier/__init__.py | 1 | CODE | |
| LOW | dowhy/causal_identifier/__init__.py | 1 | CODE | |
| LOW | dowhy/causal_identifier/__init__.py | 1 | CODE | |
| LOW | dowhy/causal_identifier/__init__.py | 1 | CODE | |
| LOW | dowhy/causal_identifier/__init__.py | 11 | CODE | |
| LOW | dowhy/causal_identifier/__init__.py | 11 | CODE | |
| LOW | dowhy/causal_identifier/__init__.py | 12 | CODE | |
| LOW | dowhy/causal_identifier/__init__.py | 13 | CODE | |
| LOW | dowhy/causal_estimators/tabpfn_estimator.py | 1 | CODE | |
| LOW | …usal_estimators/propensity_score_matching_estimator.py | 3 | CODE | |
| LOW | dowhy/timeseries/temporal_shift.py | 2 | CODE | |
| LOW | dowhy/timeseries/temporal_shift.py | 2 | CODE | |
| LOW | dowhy/timeseries/temporal_shift.py | 2 | CODE | |
| LOW | dowhy/causal_refuters/data_subset_refuter.py | 10 | CODE | |
| LOW | dowhy/causal_refuters/placebo_treatment_refuter.py | 12 | CODE | |
| LOW | dowhy/causal_refuters/evalue_sensitivity_analyzer.py | 10 | CODE | |
| LOW | dowhy/causal_refuters/bootstrap_refuter.py | 12 | CODE | |
| LOW | dowhy/causal_refuters/__init__.py | 5 | CODE | |
| LOW | dowhy/causal_refuters/__init__.py | 5 | CODE | |
| LOW | dowhy/causal_refuters/__init__.py | 5 | CODE | |
| LOW | dowhy/causal_refuters/__init__.py | 10 | CODE | |
| LOW | dowhy/causal_refuters/__init__.py | 10 | CODE | |
| LOW | dowhy/causal_refuters/__init__.py | 11 | CODE | |
| LOW | dowhy/causal_refuters/__init__.py | 11 | CODE | |
| LOW | dowhy/causal_refuters/__init__.py | 12 | CODE | |
| LOW | dowhy/causal_refuters/__init__.py | 12 | CODE | |
| 100 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …usal_estimators/test_two_stage_regression_estimator.py | 86 | # Create the graph describing the causal structure | COMMENT |
| MEDIUM | …usal_estimators/test_two_stage_regression_estimator.py | 142 | # Create a model | STRING |
| MEDIUM | tests/causal_estimators/test_causalml_estimator.py | 36 | # Create a model that captures the same | COMMENT |
| MEDIUM | tests/causal_estimators/test_causalml_estimator.py | 61 | # Create a model that captures the same | COMMENT |
| MEDIUM | tests/causal_estimators/test_causalml_estimator.py | 86 | # Create a model that captures the same | COMMENT |
| MEDIUM | tests/causal_estimators/test_causalml_estimator.py | 113 | # Create a model that captures the same | COMMENT |
| MEDIUM | tests/causal_estimators/test_causalml_estimator.py | 138 | # Create a model that captures the same | COMMENT |
| MEDIUM | tests/causal_estimators/base.py | 307 | # Create a copy of the data and swap the rows. | COMMENT |
| MEDIUM | …/causal_estimators/test_distance_matching_estimator.py | 153 | # Create a categorical common cause | COMMENT |
| MEDIUM | …ts/causal_refuters/test_add_unobserved_common_cause.py | 266 | # Creating a model with no unobserved confounders | COMMENT |
| MEDIUM | tests/gcm/test_anomaly.py | 334 | {"X0": X0[:1], "X1": X1[:1] + np.std(X1.data) * 3, "X2": X2[:1], "X3": X3[:1]} # Creating an anomaly here | CODE |
| MEDIUM | tests/gcm/test_anomaly_attribution.py | 31 | # Defining an anomaly scorer that handles multidimensional inputs. | COMMENT |
| MEDIUM | tests/gcm/test_anomaly_attribution.py | 84 | # Defining an anomaly scorer that handles multidimensional inputs. | COMMENT |
| MEDIUM | …discovery-book/test_causal_inference_discovery_book.py | 72 | # Define the true effect | COMMENT |
| MEDIUM | …discovery-book/test_causal_inference_discovery_book.py | 145 | # Create the graph describing the causal structure | COMMENT |
| MEDIUM | docs/generate_docs.sh | 54 | # Create the top-level index.html | COMMENT |
| MEDIUM | dowhy/datasets.py | 892 | # Creating a NN to simulate the nuisance function | COMMENT |
| MEDIUM | dowhy/datasets.py | 969 | # The following code for loading the Lalonde dataset was copied from | COMMENT |
| MEDIUM | dowhy/datasets.py | 1010 | # The following code is a slight modification of | COMMENT |
| MEDIUM | dowhy/causal_model.py | 351 | # Define the third-party estimation method to be used | COMMENT |
| MEDIUM | dowhy/gcm/unit_change.py | 1 | """This module provides the APIs for attributing the change in the output value of a deterministic mechanism for a stati | STRING |
| MEDIUM | dowhy/gcm/whatif.py | 1 | """This module provides functionality to answer what-if questions.""" | STRING |
| MEDIUM | dowhy/gcm/causal_mechanisms.py | 1 | """This module implements different causal mechanisms.""" | STRING |
| MEDIUM | dowhy/gcm/fitting_sampling.py | 1 | """This module provides functionality for fitting probabilistic causal models and drawing samples from them.""" | STRING |
| MEDIUM | dowhy/gcm/confidence_intervals.py | 1 | """This module provides functionality to estimate confidence intervals via bootstrapping.""" | STRING |
| MEDIUM | dowhy/gcm/influence.py | 1 | """This module provides functions to estimate causal influences.""" | STRING |
| MEDIUM | dowhy/gcm/influence.py | 81 | # Creating a smaller subgraph, which only contains upstream nodes that are connected to the target node. | COMMENT |
| MEDIUM | dowhy/gcm/influence.py | 273 | # Creating a smaller subgraph, which only contains upstream nodes that are connected to the target node. | COMMENT |
| MEDIUM | dowhy/gcm/confidence_intervals_cms.py | 1 | """This module provides functionality to estimate confidence intervals via bootstrapping the fitting and sampling.""" | STRING |
| MEDIUM | dowhy/gcm/shapley.py | 1 | """This module provides functionality for shapley value estimation.""" | STRING |
| MEDIUM | dowhy/gcm/falsify.py | 1 | """This module provides functionality to falsify a user-given DAG given observed data.""" | STRING |
| MEDIUM | dowhy/utils/timeseries.py | 207 | # Create a new edge with a tuple containing the time lag | COMMENT |
| MEDIUM | dowhy/utils/timeseries.py | 216 | # Create a new edge with a tuple containing the time lag | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/causal_refuters/base.py | 34 | CODE | |
| LOW | tests/gcm/ml/test_classification.py | 31 | CODE | |
| LOW | tests/gcm/ml/test_classification.py | 32 | CODE | |
| LOW | …usal_identifiers/test_efficient_backdoor_identifier.py | 11 | CODE | |
| LOW | dowhy/causal_refuter.py | 80 | CODE | |
| LOW | dowhy/causal_graph.py | 28 | CODE | |
| LOW | dowhy/causal_graph.py | 90 | CODE | |
| LOW | dowhy/graph.py | 366 | CODE | |
| LOW | dowhy/graph.py | 435 | CODE | |
| LOW | dowhy/datasets.py | 631 | CODE | |
| LOW | dowhy/datasets.py | 646 | CODE | |
| LOW | dowhy/datasets.py | 686 | CODE | |
| LOW | dowhy/causal_model.py | 21 | CODE | |
| LOW | dowhy/causal_model.py | 271 | CODE | |
| LOW | dowhy/causal_model.py | 549 | CODE | |
| LOW | dowhy/causal_identifier/backdoor.py | 137 | CODE | |
| LOW | dowhy/causal_identifier/backdoor.py | 249 | CODE | |
| LOW | dowhy/causal_identifier/efficient_backdoor.py | 196 | CODE | |
| LOW | dowhy/causal_identifier/efficient_backdoor.py | 250 | CODE | |
| LOW | dowhy/causal_identifier/auto_identifier.py | 154 | CODE | |
| LOW | …hy/causal_estimators/two_stage_regression_estimator.py | 165 | CODE | |
| LOW | dowhy/causal_estimators/distance_matching_estimator.py | 172 | CODE | |
| LOW | dowhy/timeseries/temporal_shift.py | 8 | CODE | |
| LOW | dowhy/timeseries/temporal_shift.py | 78 | CODE | |
| LOW | dowhy/causal_refuters/placebo_treatment_refuter.py | 97 | CODE | |
| LOW | dowhy/causal_refuters/evalue_sensitivity_analyzer.py | 96 | CODE | |
| LOW | dowhy/causal_refuters/bootstrap_refuter.py | 95 | CODE | |
| LOW | dowhy/causal_refuters/linear_sensitivity_analyzer.py | 224 | CODE | |
| LOW | dowhy/causal_refuters/dummy_outcome_refuter.py | 258 | CODE | |
| LOW | dowhy/causal_refuters/dummy_outcome_refuter.py | 728 | CODE | |
| LOW | dowhy/causal_refuters/dummy_outcome_refuter.py | 871 | CODE | |
| LOW | dowhy/causal_refuters/dummy_outcome_refuter.py | 894 | CODE | |
| LOW | dowhy/causal_refuters/add_unobserved_common_cause.py | 847 | CODE | |
| LOW | dowhy/causal_refuters/add_unobserved_common_cause.py | 137 | CODE | |
| LOW | dowhy/causal_refuters/graph_refuter.py | 69 | CODE | |
| LOW | dowhy/causal_refuters/overrule/utils.py | 41 | CODE | |
| LOW | …/causal_refuters/overrule/BCS/load_process_data_BCS.py | 67 | CODE | |
| LOW | …/causal_refuters/overrule/BCS/load_process_data_BCS.py | 132 | CODE | |
| LOW | dowhy/causal_refuters/overrule/BCS/beam_search.py | 56 | CODE | |
| LOW | …y/causal_refuters/overrule/BCS/overlap_boolean_rule.py | 291 | CODE | |
| LOW | dowhy/gcm/model_evaluation.py | 416 | CODE | |
| LOW | dowhy/gcm/model_evaluation.py | 634 | CODE | |
| LOW | dowhy/gcm/model_evaluation.py | 762 | CODE | |
| LOW | dowhy/gcm/model_evaluation.py | 783 | CODE | |
| LOW | dowhy/gcm/model_evaluation.py | 182 | CODE | |
| LOW | dowhy/gcm/model_evaluation.py | 427 | CODE | |
| LOW | dowhy/gcm/equation_parser.py | 38 | CODE | |
| LOW | dowhy/gcm/distribution_change_robust.py | 203 | CODE | |
| LOW | dowhy/gcm/distribution_change_robust.py | 294 | CODE | |
| LOW | dowhy/gcm/influence.py | 160 | CODE | |
| LOW | dowhy/gcm/shapley.py | 77 | CODE | |
| LOW | dowhy/gcm/shapley.py | 289 | CODE | |
| LOW | dowhy/gcm/data_generator.py | 229 | CODE | |
| LOW | dowhy/gcm/falsify.py | 304 | CODE | |
| LOW | dowhy/gcm/falsify.py | 745 | CODE | |
| LOW | dowhy/gcm/falsify.py | 964 | CODE | |
| LOW | dowhy/gcm/auto.py | 185 | CODE | |
| LOW | dowhy/gcm/auto.py | 401 | CODE | |
| LOW | dowhy/gcm/auto.py | 513 | CODE | |
| LOW | dowhy/gcm/auto.py | 548 | CODE | |
| 13 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/causal_estimators/test_causalml_estimator.py | 23 | CODE | |
| LOW | tests/causal_estimators/base.py | 22 | CODE | |
| LOW | tests/causal_estimators/base.py | 117 | CODE | |
| LOW | tests/causal_refuters/base.py | 34 | CODE | |
| LOW | dowhy/datasets.py | 71 | CODE | |
| LOW | dowhy/datasets.py | 850 | CODE | |
| LOW | dowhy/datasets.py | 1040 | CODE | |
| LOW | dowhy/causal_estimator.py | 56 | CODE | |
| LOW | dowhy/causal_model.py | 21 | CODE | |
| LOW | dowhy/causal_model.py | 271 | CODE | |
| LOW | dowhy/causal_model.py | 499 | CODE | |
| LOW | dowhy/causal_identifier/identified_estimand.py | 12 | CODE | |
| LOW | dowhy/causal_estimators/econml.py | 34 | CODE | |
| LOW | dowhy/causal_estimators/tabpfn_estimator.py | 272 | CODE | |
| LOW | …sal_estimators/propensity_score_weighting_estimator.py | 27 | CODE | |
| LOW | …hy/causal_estimators/two_stage_regression_estimator.py | 34 | CODE | |
| LOW | …ausal_estimators/regression_discontinuity_estimator.py | 21 | CODE | |
| LOW | …usal_estimators/propensity_score_matching_estimator.py | 28 | CODE | |
| LOW | dowhy/causal_estimators/linear_regression_estimator.py | 27 | CODE | |
| LOW | dowhy/causal_estimators/causalml.py | 30 | CODE | |
| LOW | …y/causal_estimators/instrumental_variable_estimator.py | 31 | CODE | |
| LOW | dowhy/causal_estimators/distance_matching_estimator.py | 22 | CODE | |
| LOW | dowhy/causal_estimators/propensity_score_estimator.py | 21 | CODE | |
| LOW | …ausal_estimators/generalized_linear_model_estimator.py | 26 | CODE | |
| LOW | …stimators/propensity_score_stratification_estimator.py | 27 | CODE | |
| LOW | dowhy/causal_estimators/doubly_robust_estimator.py | 27 | CODE | |
| LOW | dowhy/causal_estimators/regression_estimator.py | 21 | CODE | |
| LOW | …causal_refuters/partial_linear_sensitivity_analyzer.py | 46 | CODE | |
| LOW | …causal_refuters/partial_linear_sensitivity_analyzer.py | 522 | CODE | |
| LOW | dowhy/causal_refuters/bootstrap_refuter.py | 147 | CODE | |
| LOW | dowhy/causal_refuters/assess_overlap_overrule.py | 109 | CODE | |
| LOW | dowhy/causal_refuters/linear_sensitivity_analyzer.py | 31 | CODE | |
| LOW | dowhy/causal_refuters/linear_sensitivity_analyzer.py | 368 | CODE | |
| LOW | dowhy/causal_refuters/dummy_outcome_refuter.py | 258 | CODE | |
| LOW | dowhy/causal_refuters/dummy_outcome_refuter.py | 408 | CODE | |
| LOW | dowhy/causal_refuters/add_unobserved_common_cause.py | 703 | CODE | |
| LOW | dowhy/causal_refuters/add_unobserved_common_cause.py | 847 | CODE | |
| LOW | dowhy/causal_refuters/reisz.py | 149 | CODE | |
| LOW | dowhy/causal_refuters/overrule/ruleset.py | 27 | CODE | |
| LOW | …y/causal_refuters/overrule/BCS/overlap_boolean_rule.py | 25 | CODE | |
| LOW | dowhy/gcm/model_evaluation.py | 53 | CODE | |
| LOW | dowhy/gcm/distribution_change_robust.py | 612 | CODE | |
| LOW | dowhy/gcm/distribution_change_robust.py | 294 | CODE | |
| LOW | dowhy/gcm/distribution_change_robust.py | 514 | CODE | |
| LOW | dowhy/gcm/influence.py | 216 | CODE | |
| LOW | dowhy/gcm/distribution_change.py | 87 | CODE | |
| LOW | dowhy/gcm/distribution_change.py | 350 | CODE | |
| LOW | dowhy/gcm/falsify.py | 518 | CODE | |
| LOW | dowhy/gcm/independence_test/kernel.py | 113 | CODE | |
| LOW | dowhy/gcm/util/plotting.py | 50 | CODE | |
| LOW | dowhy/utils/plotting.py | 113 | CODE | |
| LOW | dowhy/api/causal_data_frame.py | 35 | CODE | |
| LOW | dowhy/causal_prediction/algorithms/cacm.py | 9 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/utils/test_plotting.py | 21 | # Check if calling the method causes some import or runtime errors | COMMENT |
| LOW | tests/causal_identifiers/test_optimize_backdoor.py | 28 | # Check if backdoor sets are valid i.e. if they block all paths between the treatment and the outcome | COMMENT |
| LOW | tests/causal_identifiers/test_optimize_backdoor.py | 77 | # Check if backdoor sets are valid i.e. if they block all paths between the treatment and the outcome | COMMENT |
| LOW | tests/causal_identifiers/test_optimize_backdoor.py | 105 | # Check if backdoor sets are valid i.e. if they block all paths between the treatment and the outcome | COMMENT |
| LOW | tests/causal_identifiers/test_optimize_backdoor.py | 133 | # Check if backdoor sets are valid i.e. if they block all paths between the treatment and the outcome | COMMENT |
| LOW | tests/causal_identifiers/test_optimize_backdoor.py | 161 | # Check if backdoor sets are valid i.e. if they block all paths between the treatment and the outcome | COMMENT |
| LOW | dowhy/causal_refuter.py | 119 | # Check if all are select or deselect variables | COMMENT |
| LOW | dowhy/causal_refuter.py | 131 | # Check if all the required_variables belong to confounders, instrumental variables or effect | COMMENT |
| LOW | dowhy/datasets.py | 737 | ): # Check if current "node" has not been processed yet and if all the parent nodes have been processed | CODE |
| LOW | dowhy/causal_estimator.py | 116 | # Check if some parameters were set, otherwise set to default values | COMMENT |
| LOW | dowhy/causal_estimator.py | 551 | # Check if any parameter is changed from the previous std error estimate | COMMENT |
| LOW | dowhy/causal_estimator.py | 887 | # Check if estimator's target estimand is identified | COMMENT |
| LOW | dowhy/causal_model.py | 432 | # Check if estimator's target estimand is identified | COMMENT |
| LOW | dowhy/causal_identifier/backdoor.py | 166 | # Check if path is backdoor and does not have nodes1\node1 or nodes2\node2 as intermediate nodes | COMMENT |
| LOW | …hy/causal_estimators/two_stage_regression_estimator.py | 92 | # Check if the treatment is one-dimensional | COMMENT |
| LOW | dowhy/causal_estimators/distance_matching_estimator.py | 136 | # Check if the treatment is one-dimensional | COMMENT |
| LOW | dowhy/causal_estimators/propensity_score_estimator.py | 128 | # Check if the treatment is one-dimensional | COMMENT |
| LOW | dowhy/timeseries/temporal_shift.py | 59 | # Add the parent to the queue for further exploration | COMMENT |
| LOW | dowhy/causal_refuters/assess_overlap_overrule.py | 210 | # Check if all supported units are considered to be in the overlap set | COMMENT |
| LOW | dowhy/causal_refuters/dummy_outcome_refuter.py | 608 | # Check if we are using an estimator in the transformation list | COMMENT |
| LOW | dowhy/causal_refuters/overrule/BCS/beam_search.py | 159 | # Check if duplicate | COMMENT |
| LOW | dowhy/gcm/whatif.py | 175 | # Check if we need to apply an intervention on the given node. | COMMENT |
| LOW | dowhy/gcm/whatif.py | 180 | # Check if the intervention function changes the shape of the data. | COMMENT |
| LOW | dowhy/gcm/shapley.py | 447 | # Check if change in percentage is below threshold | COMMENT |
| LOW | dowhy/utils/timeseries.py | 45 | # Check if the edge already exists | COMMENT |
| LOW | dowhy/utils/timeseries.py | 104 | # Check if the edge already exists | COMMENT |
| LOW | dowhy/causal_prediction/algorithms/base_algorithm.py | 28 | # Check if the optimizer is currently supported | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | dowhy/causal_refuter.py | 19 | logger = logging.getLogger(__name__) | CODE |
| LOW | dowhy/__init__.py | 39 | __all__ = [ | CODE |
| LOW | dowhy/causal_estimator.py | 17 | logger = logging.getLogger(__name__) | CODE |
| LOW | dowhy/causal_identifier/__init__.py | 15 | __all__ = [ | CODE |
| LOW | dowhy/causal_identifier/auto_identifier.py | 30 | logger = logging.getLogger(__name__) | CODE |
| LOW | dowhy/causal_estimators/tabpfn_estimator.py | 16 | logger = logging.getLogger(__name__) | CODE |
| LOW | dowhy/causal_estimators/causalml.py | 19 | logger = logging.getLogger(__name__) | CODE |
| LOW | dowhy/causal_refuters/data_subset_refuter.py | 14 | logger = logging.getLogger(__name__) | CODE |
| LOW | dowhy/causal_refuters/placebo_treatment_refuter.py | 18 | logger = logging.getLogger(__name__) | CODE |
| LOW | dowhy/causal_refuters/bootstrap_refuter.py | 16 | logger = logging.getLogger(__name__) | CODE |
| LOW | dowhy/causal_refuters/__init__.py | 33 | __all__ = [ | CODE |
| LOW | dowhy/causal_refuters/assess_overlap.py | 8 | logger = logging.getLogger(__name__) | CODE |
| LOW | dowhy/causal_refuters/dummy_outcome_refuter.py | 21 | logger = logging.getLogger(__name__) | CODE |
| LOW | dowhy/causal_refuters/add_unobserved_common_cause.py | 25 | logger = logging.getLogger(__name__) | CODE |
| LOW | dowhy/causal_refuters/random_common_cause.py | 15 | logger = logging.getLogger(__name__) | CODE |
| LOW | dowhy/gcm/config.py | 15 | def set_default_n_jobs(n_jobs: int) -> None: | CODE |
| LOW | dowhy/gcm/causal_models.py | 66 | def set_causal_mechanism(self, node: Any, mechanism: Union[StochasticModel, ConditionalStochasticModel]) -> None: | CODE |
| LOW | dowhy/gcm/causal_models.py | 101 | def set_causal_mechanism(self, node: Any, mechanism: Union[StochasticModel, FunctionalCausalModel]) -> None: | CODE |
| LOW | dowhy/gcm/equation_parser.py | 35 | logger = logging.getLogger(__name__) | CODE |
| LOW | dowhy/gcm/util/general.py | 41 | def set_random_seed(random_seed: int) -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | dowhy/causal_refuter.py | 167 | "The normal-distribution p-value is undefined; returning p_value=1." | CODE |
| HIGH | dowhy/causal_refuters/evalue_sensitivity_analyzer.py | 425 | # if CI crosses null, set its E-value to 1 | COMMENT |
| HIGH | dowhy/gcm/divergence.py | 110 | D_f(P || Q) = \int f(p(x)/q(x)) q(x) dx ~= -1/N \sum_x log(p(Y = 1 | x) / (1 - p(Y = 1 | x))) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | tests/test_causal_refuter.py | 40 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_causal_refuter.py | 42 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/causal_prediction/test_causal_prediction.py | 9 | # ── pure-Python tests (no torch / pytorch-lightning required) ───────────────── | COMMENT |
| MEDIUM⚡ | tests/causal_prediction/test_causal_prediction.py | 62 | # ── torch-dependent tests (skipped when torch / pl are absent) ──────────────── | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test_parallel_refuters.py | 45 | except Exception as e: | CODE |
| LOW | test_parallel_refuters.py | 69 | except Exception as e: | CODE |
| LOW | tests/test_causal_estimator.py | 84 | except Exception: | CODE |
| MEDIUM | tests/causal_estimators/test_causalml_estimator.py | 159 | print("Error with respect to the number of samples") | CODE |
| MEDIUM | tests/causal_estimators/base.py | 17 | print("Error tolerance is", error_tolerance) | CODE |
| LOW | dowhy/graph.py | 465 | except Exception as e: | CODE |
| LOW | dowhy/graph.py | 471 | except Exception as e: | CODE |
| LOW | dowhy/graph.py | 482 | except Exception as e: | CODE |
| LOW | dowhy/graph.py | 489 | except Exception as e: | CODE |
| LOW | dowhy/causal_estimators/tabpfn_estimator.py | 57 | except Exception as e: | CODE |
| LOW | dowhy/utils/encoding.py | 54 | except Exception as e: | CODE |
| LOW | dowhy/utils/plotting.py | 61 | except Exception as error: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_causal_estimator.py | 21 | class TestCausalEstimator(unittest.TestCase): | COMMENT |
| LOW | docs/source/conf.py | 1 | # -*- coding: utf-8 -*- | COMMENT |
| LOW | docs/source/conf.py | 81 | # The suffix(es) of source filenames. | COMMENT |
| LOW | docs/source/conf.py | 121 | # | COMMENT |
| LOW | docs/source/conf.py | 141 | COMMENT | |
| LOW | .github/workflows/repo-assist.lock.yml | 1 | # gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"6538abb568ad674ed3bfd5cd20c199190f28c126725f245a8bf6cbc92f9 | COMMENT |
| LOW | .github/workflows/repo-assist.lock.yml | 21 | # Not all edits will cause changes to this file. | COMMENT |
| LOW | .github/workflows/repo-assist.lock.yml | 41 | # - COPILOT_GITHUB_TOKEN | COMMENT |
| LOW | dowhy/datasets.py | 961 | "gml_graph": gml_graph, | COMMENT |
| LOW | dowhy/datasets.py | 1001 | return lalonde | COMMENT |
| LOW | dowhy/datasets.py | 1021 | # 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the | COMMENT |
| LOW | dowhy/gcm/confidence_intervals_cms.py | 21 | # | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | dowhy/causal_prediction/models/networks.py | 90 | tmp = self.network.conv1.weight.data.clone() | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | dowhy/gcm/confidence_intervals_cms.py | 26 | # In this example, gcm.confidence_intervals is expecting a callable with non-deterministic outputs for building the | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | dowhy/graph.py | 248 | # First we can just call get_proper_causal_path_nodes, then | COMMENT |
| MEDIUM | dowhy/causal_estimators/doubly_robust_estimator.py | 214 | # Doubly robust formula | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/causal_refuters/test_assess_overlap.py | 10 | def dummy_data(): | CODE |
| LOW | tests/causal_refuters/test_assess_overlap.py | 34 | def refute(dummy_data): | CODE |
| LOW | tests/causal_refuters/test_assess_overlap.py | 35 | model = CausalModel(data=dummy_data, treatment="T", outcome="Y", common_causes=["X1", "X2"]) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | AGENTS.md | 23 | causal_model.py # CausalModel: orchestrates the 4-step workflow | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | dowhy/causal_refuters/dummy_outcome_refuter.py | 728 | def process_data( | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | dowhy/causal_refuters/dummy_outcome_refuter.py | 754 | :param outcome_validation: This variable stores the dummy_outcome generated by the transformations | STRING |