Spaces:
Runtime error
Runtime error
Commit History
-
feat(ml): CEFR dataset builder and XLM-R training pipeline with MLflow tracking (#2)
Arthur_DiazUnverified signature## What & why Implements the ADR 0003 policies as tested, dependency-free code plus a config-driven training pipeline for the M1 CEFR classifier (experiment arms 1–3 and the generalization audits). Preprocessing, splitting, aggregation and metrics live in `src/tutor/ml/cefr/` so Space inference will apply them byte-for-byte (no train/serve skew) and CI tests them without torch; GPU-only code stays in `training/` and never enters the runtime image (ADR 0001). ## Changes - `src/tutor/ml/cefr/`: label policy (X+ → X, drop list), sentence-packing chunker, document-level stratified deterministic split, expected-rank chunk→document aggregation, pure ordinal metrics (macro-F1, adjacent accuracy, QWK, per-level F1 + support) — no sklearn - `training/`: UniversalCEFR loading, `train_cefr.py` (TOML configs, class weights, MLflow tracking, doc+sentence test views with EN headline scope, `--dry-run` with built-in leakage check), `eval_cefr.py` (evaluates any checkpoint incl. the published…14e67ea