sklearn metadata routing: let `treatment` reach a learner inside a Pipeline
@su-jin1425 ci sta già lavorando.
Dal 16/8/2026.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- python, scikit-learn
- Ambito
- documentation, machine-learning, testing-qa
Direzione di ricerca
Inizia con sklearn.utils.metadata_routing e Pipeline, quindi esamina le signature di fit di BaseLearner e del meta-learner dopo l’integrazione di #985. Aggiungi la copertura di integrazione per un S-learner e un learner che consuma propensity con routing abilitato e con prefisso, oltre all’esempio documentato di Pipeline. È completato quando il trattamento raggiunge il learner finale senza un adapter e la riproduzione di #854 funziona.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Part of #980 (v1.0 M1). Closes #854 when it lands.
Reordering fit to (X, y, treatment, …) is necessary but not sufficient for #854. Pipeline.fit(X, y) passes exactly two things; treatment is a third required array with nowhere to ride. After the flip a CausalML learner still can't be a Pipeline step without an adapter — the reordering just removes the first obstacle.
The mechanism sklearn provides is metadata routing: fit(X, y, **fit_params) with set_fit_request(treatment=True), so a caller writes pipe.fit(X, y, treatment=treatment) and the router delivers treatment to the step that asked for it.
Prerequisite
#985, the signature flip. Until then Pipeline's positional y binds to treatment, so an end-to-end test cannot be written. #985 is unblocked and targets v1.0 (Jun 2027).
Scope for the first pass
- Meta-learners only — they are the classes users most want inside a Pipeline.
- Integration tests and documentation before any custom
MetadataRouter.BaseLearnersubclassesBaseEstimatorand thefitsignatures declaretreatmentandpexplicitly, soset_fit_requestshould be generated automatically; confirm that againstsklearn.utils.metadata_routingbefore writing any routing code. - Cover an S-learner pipeline plus one propensity-consuming learner.
- Cover both paths: routing enabled via
sklearn.set_config(enable_metadata_routing=True), and the prefixed routing-disabled form. - Row-preserving transformers only. Resampling has to move
X,y,treatmentandptogether and belongs in its own design.
Out of scope for the first pass: whether p should route into a learner's wrapped estimator, rather than being consumed by the learner itself.
Why it's separate
The argument order is a breaking change on a deadline (v1.0 API freeze); routing is additive and can land any time after. Coupling them would put a design-heavy feature on the critical path of a mechanical rename.
Acceptance
- A documented, tested example of a CausalML learner as a
Pipelinefinal step withtreatmentrouted, no adapter class. - #854's original reproduction works.
- Lingua principale
- Python
- Stelle
- 6k
- Fork
- 892
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di uber/causalml
-
Add a pickle-size regression test for fitted learners (v1.0 M1)Forse già presa @techi101 l’ha presa 7 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 67/100
-
BaseRClassifier ignores cv_n_jobs during outcome cross-validationForse già presa @ayuxy027 l’ha presa 17 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 25/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
-
cate_scoring default learner is oversized for its own per-fold, per-arm call patternForse già presa @su-jin1425 l’ha presa 78 giorni fa. Apertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
S-, T- and X-learner bootstrap confidence intervals are not reproducibleForse già presa @su-jin1425 l’ha presa 78 giorni fa. Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
Tutte le issue di uber/causalml
Issue simili
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
splunk/security_content#4418 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug / Enhancement]: Improve teleop_robot CLI with configurable timeout, robust input validation, and clean ROS shutdownForse già presa @muskan-creates352 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 3 giorni
-
bug(pipelines): shortcode stripping deletes text between a {{< >}} shortcode and the next {{% %}}Forse già presa @Ashborne-lab l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
kubeflow/docs-agent#293 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Imbad0202/academic-research-skills#1093 ·
I maintainer di solito rispondono entro 1 giorno
-
Input: placeholder drawn in the text colour when the empty Input is focused but not yet editedAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
pierreaubert/gpui-toolkit#114 ·
I maintainer di solito rispondono entro 1 giorno