Development¶
Daily workflow¶
- keep behavioral changes and docs changes together
- run
pytest -qbefore committing - run
mkdocs build --strictbefore pushing doc changes - prefer updating the canonical starter configs instead of documenting stale paths
Key code areas¶
src/training/datasets.py: dataset ingestion, feature selection, sanitation, variance threshold, and SVD defaultssrc/training/pipeline_steps.py: scaler, PCA, polynomial features, sampler creation, and pipeline orderingsrc/training/model_runner.py: nested CV, search execution, hold-out scoring, and metrics YAML outputsrc/training/reporting.py: dataset summary YAML and CSV outputsrc/cli/: public CLI surfaces that docs must match exactly
Adding a new model¶
- Add a builder in
src/training/model_registry.py. - Register it in
MODEL_BUILDERS. - Add metadata and a
param_gridin the chosen hyperparameter YAML. - Verify
requires_scaleranduse_smoteare set deliberately. - Add or extend tests that cover discoverability and training behavior.
Updating docs safely¶
When behavior changes:
- validate CLI examples against
--help - validate file names and path patterns against the actual code, not older docs
- check whether config defaults, output names, or pipeline order changed
- keep the GitHub Pages home page, root README, and canonical config aligned
Config hygiene¶
- treat
configs/train.yamlas the canonical starter path because the training CLI help points there - use
configs/train_example_dpk.yamlonly when the DPK CSV has actually been generated - remember that metadata columns preserved by
process_featuresmust be dropped at training time - remember that the shared run ledger always lives at
models/tracking/training_runs.csv
Docs and CI¶
The repository now uses:
mkdocs.ymlas the site entrypoint.github/workflows/ci.ymlto run tests andmkdocs build --strict.github/workflows/pages.ymlto publish the GitHub Pages site frommain
If a docs change breaks navigation or links, the strict MkDocs build should fail in CI.