-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathevaluate.py
More file actions
18 lines (14 loc) · 817 Bytes
/
Copy pathevaluate.py
File metadata and controls
18 lines (14 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"""Stage `evaluate` del pipeline **DVC** (cat 1) — corre el eval AGNÓSTICO sobre el dato del
stage `featurize` y persiste el modelo como out cacheado.
Concerns DVC aquí (y SOLO aquí, no en el core agnóstico): (1) leer `data/features.parquet` —la
arista real del DAG `featurize → evaluate`—; (2) volcar `model.pkl` como **out CACHEADO** (DVC
versiona el MODELO entrenado, Art.15, content-addressed). La medición (venturalitica-sdk) vive
en `compliance_eval`; el tratamiento (variante) en `train.py`.
"""
import joblib
import pandas as pd
import compliance_eval
import train
df = pd.read_parquet("data/features.parquet") # out del stage `featurize` (arista del DAG)
_, model = compliance_eval.run(train.build_model, df)
joblib.dump(model, "model.pkl") # out cacheado: DVC versiona el modelo (Art.15)