mirror of
https://github.com/hanzoai/engine.git
synced 2026-11-20 23:45:50 +00:00
New hanzo-router-retrain crate + pipeline that refits the Enso routing heads from the ai routing ledger nightly, gates the candidate on an 80/20 holdout, and publishes only a non-regressing head per scope. - hanzo-router-retrain/: enso-fit binary on the `fit --events --out` contract (drop-in for enso's own fit via $FIT_BIN) + tested core: transform_reward (ai reward tuple -> enso EvalSample), fit_policy (proof.rs (x,p,quality) join -> fit_base), holdout_reward, decide_gate (fail-closed), save_w/load_w (enso-base safetensors: f64 tensor "w", [D*K]). 9 unit tests green. - scripts/router-retrain.sh: one scope (global -> heads-base.safetensors owner "*"; org=<slug> -> heads-<slug>.safetensors owner "<slug>"); pull -> fit -> gate -> promote-or-hold -> log.jsonl -> POST /v1/router/publish-artifact-meta. router-retrain-all.sh sequences global + per-opted-in-org. - deploy/router-retrain/: systemd user timer (04:20 America/Los_Angeles, Persistent) = the live spark scheduler; hanzoai/tasks cron ConfigMap as the in-cluster convergence reference; install.sh; LLM.md with the blocker list. Gate is holdout (RouterBench absent in-repo). DO_RELOAD=0 by default: publish writes the versioned artifact + current pointer but does not restart the engine until it mounts heads (unwired). Rebased onto origin/main; the crate builds against the committed enso primitives (fit_base/ingest/parse_jsonl) and writes the load_learner-compatible safetensors itself. Co-authored-by: Hanzo Dev <[email protected]>