|
| 1 | +# Person 3 Work Plan (ML Training & Evaluation) |
| 2 | + |
| 3 | +**Owner:** Chenou |
| 4 | +**Date:** 2026-07-13 |
| 5 | +**Branch:** person3-ml-training-eval |
| 6 | +**Target milestone:** Phase 3 complete by 2026-07-27 |
| 7 | + |
| 8 | +--- |
| 9 | + |
| 10 | +## Scope |
| 11 | + |
| 12 | +Build the end-to-end ML pipeline for ConfoState: |
| 13 | + |
| 14 | +1. Dataset assembly and split logic |
| 15 | +2. Baseline model training |
| 16 | +3. Evaluation + report generation |
| 17 | +4. Model artifact management / registry |
| 18 | + |
| 19 | +Primary deliverables: |
| 20 | +- confostate/data/datasets.py |
| 21 | +- confostate/models/baseline.py |
| 22 | +- confostate/models/train.py |
| 23 | +- confostate/models/evaluate.py |
| 24 | +- confostate/models/registry.py |
| 25 | +- tests for datasets/model training/evaluation |
| 26 | +- trained artifacts in data/models/ |
| 27 | +- evaluation report in docs/reports/ |
| 28 | + |
| 29 | +--- |
| 30 | + |
| 31 | +## Dependencies and Risk Controls |
| 32 | + |
| 33 | +### Needed from Person 1 and 2 |
| 34 | +- Stable annotations schema in data/annotations/leu_t_transporters.csv |
| 35 | +- Feature vectors for training rows (or at least a subset) |
| 36 | + |
| 37 | +### Risk if features are delayed |
| 38 | +- Use a synthetic feature table to unblock model/training/evaluation development. |
| 39 | +- Keep synthetic schema aligned with expected real feature names. |
| 40 | +- Add a quick integration check that can switch from synthetic to real features by changing only file paths. |
| 41 | + |
| 42 | +### Definition of done for integration |
| 43 | +- Train command runs successfully from raw tabular features + labels. |
| 44 | +- Evaluation command produces metrics and confusion matrix artifact. |
| 45 | +- Registry points to a reproducible model artifact and metadata. |
| 46 | + |
| 47 | +--- |
| 48 | + |
| 49 | +## Week-by-Week Plan |
| 50 | + |
| 51 | +## Week 1 (2026-07-13 to 2026-07-19): Pipeline Skeleton + Baselines |
| 52 | + |
| 53 | +### Day 1: Data contract and dataset loader |
| 54 | +- Finalize expected columns: |
| 55 | + - keys: pdb_id, family, conformation |
| 56 | + - features: numeric columns only |
| 57 | +- Implement confostate/data/datasets.py: |
| 58 | + - load_dataset(annotations_csv, features_csv) |
| 59 | + - validate label and key integrity |
| 60 | + - make_split(strategy="stratified", test_size=0.2, random_state=...) |
| 61 | + |
| 62 | +### Day 2: Baseline model module |
| 63 | +- Implement confostate/models/baseline.py: |
| 64 | + - logistic regression baseline |
| 65 | + - random forest baseline |
| 66 | + - SVM baseline |
| 67 | +- Add uniform interface: |
| 68 | + - get_model(name, random_state, class_weight) |
| 69 | + |
| 70 | +### Day 3: Training pipeline |
| 71 | +- Implement confostate/models/train.py: |
| 72 | + - fit single model |
| 73 | + - cross-validation score summary |
| 74 | + - save artifact + metadata |
| 75 | +- Save outputs under data/models/{family}/{model_name}/ |
| 76 | + |
| 77 | +### Day 4: Evaluation module |
| 78 | +- Implement confostate/models/evaluate.py: |
| 79 | + - confusion matrix |
| 80 | + - per-class precision/recall/F1 |
| 81 | + - macro and weighted scores |
| 82 | + - optional ROC-AUC (when applicable) |
| 83 | +- Emit markdown report to docs/reports/ |
| 84 | + |
| 85 | +### Day 5: Smoke tests + first run |
| 86 | +- Add tests for: |
| 87 | + - dataset split stability |
| 88 | + - model train/predict shape and class consistency |
| 89 | + - evaluation output keys and file generation |
| 90 | +- Run first end-to-end experiment with available data or synthetic fallback |
| 91 | + |
| 92 | +## Week 2 (2026-07-20 to 2026-07-27): Hardening + Reporting + Handoff |
| 93 | + |
| 94 | +### Day 6-7: Hyperparameter tuning and comparison |
| 95 | +- Add small grid/random search for each baseline model |
| 96 | +- Compare by macro-F1 and balanced accuracy |
| 97 | +- Select default baseline for each family |
| 98 | + |
| 99 | +### Day 8: Registry and reproducibility |
| 100 | +- Implement confostate/models/registry.py: |
| 101 | + - register_model(family, model_name, artifact_path, metrics, data_version) |
| 102 | + - load_registered_model(family) |
| 103 | +- Include metadata fields: |
| 104 | + - timestamp, git commit hash, feature schema hash, random_state |
| 105 | + |
| 106 | +### Day 9: Final report package |
| 107 | +- Produce docs/reports/phase3-baseline-report.md |
| 108 | +- Include: |
| 109 | + - train/test split method |
| 110 | + - model comparison table |
| 111 | + - per-state metrics |
| 112 | + - known limitations and next steps |
| 113 | + |
| 114 | +### Day 10: Handoff to Person 4 and Person 5 |
| 115 | +- Share: |
| 116 | + - top model artifacts |
| 117 | + - feature importance-compatible model outputs |
| 118 | + - stable prediction API contract for explainability and CLI |
| 119 | + |
| 120 | +--- |
| 121 | + |
| 122 | +## Suggested File Interfaces |
| 123 | + |
| 124 | +### confostate/data/datasets.py |
| 125 | +- load_dataset(annotations_csv: str, features_csv: str, family: str | None = None) |
| 126 | +- train_test_split_dataset(df, label_col="conformation", test_size=0.2, random_state=42) |
| 127 | + |
| 128 | +### confostate/models/baseline.py |
| 129 | +- get_baseline_models(random_state=42) -> dict[str, estimator] |
| 130 | +- train_model(estimator, X_train, y_train) |
| 131 | + |
| 132 | +### confostate/models/train.py |
| 133 | +- run_training(config: dict) -> dict |
| 134 | +- save_model_artifact(model, out_dir, metadata) |
| 135 | + |
| 136 | +### confostate/models/evaluate.py |
| 137 | +- evaluate_model(model, X_test, y_test, labels=None) -> dict |
| 138 | +- write_evaluation_report(metrics: dict, output_path: str) |
| 139 | + |
| 140 | +### confostate/models/registry.py |
| 141 | +- register_model(...) |
| 142 | +- get_registered_model(family: str) |
| 143 | + |
| 144 | +--- |
| 145 | + |
| 146 | +## Daily Execution Checklist |
| 147 | + |
| 148 | +- Confirm branch and pull latest main changes (if needed) |
| 149 | +- Implement one scoped unit of functionality |
| 150 | +- Add or update tests |
| 151 | +- Run local test subset |
| 152 | +- Commit with concise message |
| 153 | +- Post async update in team channel with blockers/dependencies |
| 154 | + |
| 155 | +--- |
| 156 | + |
| 157 | +## Communication Cadence |
| 158 | + |
| 159 | +- Tuesday standup: report progress, current blocker, next 48h plan |
| 160 | +- Async updates: at least every 2 working days in #confostate-dev |
| 161 | +- Dependency syncs: |
| 162 | + - with Person 2 on feature table schema |
| 163 | + - with Person 4 on importance/explanation-ready outputs |
| 164 | + |
| 165 | +--- |
| 166 | + |
| 167 | +## Exit Criteria (Phase 3 Complete) |
| 168 | + |
| 169 | +- End-to-end training command works on at least one family |
| 170 | +- >=2 baseline models compared and documented |
| 171 | +- Evaluation report generated with per-state metrics |
| 172 | +- Model registry points to reproducible artifacts |
| 173 | +- Person 4 receives model + outputs needed for explainability |
0 commit comments