ML Architecture
ML Architecture
Section titled “ML Architecture”This guide shows an end-to-end workflow for improving ml_architecture health in production ML systems.
Workflow
Section titled “Workflow”- Run an ML architecture audit.
- Triage findings by detector family and blast radius.
- Apply targeted remediation.
- Enforce policy gates in CI.
- Prevent regressions with baseline checks.
1) Run an Audit
Section titled “1) Run an Audit”# Focused ML architecture metricarxo analyze --path . --metric ml_architecture --format json# AI preset (includes ml_architecture)arxo analyze --path . --preset ai --format json2) Triage Findings
Section titled “2) Triage Findings”Prioritize in this order:
train_serve_skew_score,train_inference_boundary_scorereproducibility_score,data_lineage_integrity_scoreeval_integrity_score,data_validation_score,ci_integration_scoreserving_maturity_score,drift_monitoring_score,monitoring_alerting_score,model_staleness_scoreab_testing_score,shadow_canary_score,serving_ops_score
Then inspect ml_architecture.overall_score movement after each fix batch.
3) Apply Fixes by Track
Section titled “3) Apply Fixes by Track”- Architecture track: shared train/serve transforms, boundary cleanup, DAG simplification.
- Repro/lineage track: seed policy, lock files, immutable dataset/model references.
- Eval/quality track: leakage-safe splits, data validation contracts, fairness and CI checks.
- Serving ops track: warmup, health/readiness, drift/staleness monitoring, alerting, canary/A/B rollout.
Use the Remediation Playbook for fix-by-metric guidance.
4) Enforce in CI
Section titled “4) Enforce in CI”Use profiles from Policy and CI Gates.
arxo analyze --path . --preset ai --config arxo.yml --fail-fastRecommended rollout:
- Start with warning-level thresholds.
- Fix recurring low-score categories in central modules.
- Promote critical gates to
errorafter score trend stabilizes.
5) Baseline and Monorepo Rollout
Section titled “5) Baseline and Monorepo Rollout”- Enable baseline no-regression checks against
origin/main. - Start in one critical ML service/workspace.
- Expand to additional workspaces after stable score trends.