Limpiar los avisos de estilo

This commit is contained in:
2026-12-04 09:12:15 -06:00
parent 984d168da7
commit cc5cfd1792
16 changed files with 440 additions and 206 deletions
+10 -5
View File
@@ -96,7 +96,9 @@ class CacuDevelopmentEvaluation(dg.Config):
@dg.op
def evaluate_cacu_development(context: dg.OpExecutionContext, config: CacuDevelopmentEvaluation) -> str:
def evaluate_cacu_development(
context: dg.OpExecutionContext, config: CacuDevelopmentEvaluation
) -> str:
"""Opt-in research evaluation only: no registered model, promotion or patient scores."""
import mlflow
import pandas as pd
@@ -112,8 +114,9 @@ def evaluate_cacu_development(context: dg.OpExecutionContext, config: CacuDevelo
if events.empty:
raise EmptyCohort(f"no eligible patients in {cohort}")
encoded = encoders.encode(events, gold.cervical_forms(cohort))
outcome = features.windowed_outcome(features.prepared(events), cacu.CIN2_PLUS, 1.0,
pd.Timestamp(as_of))
outcome = features.windowed_outcome(
features.prepared(events), cacu.CIN2_PLUS, 1.0, pd.Timestamp(as_of)
)
rows = encoded.merge(outcome, on="person_id", validate="one_to_one")
rows = rows[rows["known"]].reset_index(drop=True)
X = rows.drop(columns=["person_id", "index_date", "known", "y"])
@@ -185,5 +188,7 @@ nightly = (
else []
)
defs = dg.Definitions(jobs=[ingest, train, score, analyze, rebuild, backup,
cacu_development_evaluation], schedules=nightly)
defs = dg.Definitions(
jobs=[ingest, train, score, analyze, rebuild, backup, cacu_development_evaluation],
schedules=nightly,
)