The docstrings of dr_score and plug_in_t_score (causalml/metrics/cate_scoring.py) describe learner as optional, but _resolve_outcome_learners (cate_scoring.py:37) raises unless learner or both of control_outcome_learner/treatment_outcome_learner are passed:
from causalml.metrics import dr_score
dr_score(df, X=X, outcome_col="y", treatment_col="w")
# ValueError: Either `learner` or both `control_outcome_learner` and
# `treatment_outcome_learner` must be specified.
Observed on master (18ebfb0).
Suggestion: either supply a default learner (the sibling metrics in causalml.metrics default to LightGBM elsewhere) or change the docstrings to mark the argument required. Independent of #1026/#1027; touches only the learner-resolution path of cate_scoring.py.
🤖 Generated with Claude Code
The docstrings of
dr_scoreandplug_in_t_score(causalml/metrics/cate_scoring.py) describelearneras optional, but_resolve_outcome_learners(cate_scoring.py:37) raises unlesslearneror both ofcontrol_outcome_learner/treatment_outcome_learnerare passed:Observed on master (
18ebfb0).Suggestion: either supply a default learner (the sibling metrics in
causalml.metricsdefault to LightGBM elsewhere) or change the docstrings to mark the argument required. Independent of #1026/#1027; touches only the learner-resolution path ofcate_scoring.py.🤖 Generated with Claude Code