Limpiar los avisos de estilo
This commit is contained in:
+10
-5
@@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user