Judge every new agent model by the same fair contest #120
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/fair-promotion"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What this PR does
Makes the comparison between on-device and remote training fair. Until now the two were rarely compared at all:
local 34, remote 0with no contest ever held.Now every new model is a candidate that replaces the active model only by winning one contest:
Held-out rows no model trains on (
metrics.py): a row is held out when its hour block hashes into one bucket of five (HOLDOUT_SCHEME = "block-hash-v1", about 20%). It's deterministic on the device and the host, and stable as files rotate.train_from_logskeeps those rows out of the reward model and the replay env, and stampsholdoutinto the sidecar.One rule (
metrics.contest_decision, no notion of source):promotion_min_z, default 1.0, a new code default);promotion_decisionandremote_model_winsare removed.On-device runs are candidates (
train.py,controller.py):.candidates/local/<slug>/.The contest (
controller._run_contest,train.evaluate):evaluated.json.remote-train:host-models.json).PYTHONPATH=pkg), so the host always runs the device's trainer.cdis fixed, and launches are logged.Tally and dashboard:
promotion-tally.jsoncounts contests ({"local": {"won", "lost"}, "remote": {...}}); old counts move tobefore_fair_promotion. The agent card shows Model contests and Last contest.pull-agent-diagnostics.shis replaced by the fuller report built while investigating this:--scoreand--remote-dir: re-scoring on the device, the contest's own way included.Docs:
agent-interface.md("Candidates and promotion"),remote-training.md("One contest for every model"),agent-setup.md,config-reference.md(promotion_min_z),GUIDE_MD, CLAUDE.md, the scripts README, and three follow-ups indeferred.md:Checklist
make lint(ansible--syntax-check,yamllint,shellcheck --severity=error, and the real-data check). The Lint workflow runs this on the PR.make test(thekestrel_pipytest suite and the real-data check's tests). The Test workflow runs this on the PR..envfiles, real names, personal emails, device serials, and no real captured or device data: SSIDs, MAC addresses, GPS coordinates, capture files, diagnostics bundles, logs, or screenshots of a real device — placeholders only. The real-data check catches MACs, emails, keys and capture files; real SSIDs, coordinates and screenshots are on you.docs/, and the on-device operator guide (GUIDE_MDinkestrel_pi/userguide.py) where it applies.Release impact
kestrel_pipackage,plugins/*.py, systemd units, the journald drop-in, a lib script already in the engine'sLIB_SCRIPTS, or the CLI.config.txt/cmdline, kernel modules, the base image or partition size,builder/config.json,builder/config.yml, theMakefile,.forgejo/workflows/, a shipped config default (config.toml/default.conf), or a brand-new lib script.Notes for review
min_update_fromfloor stays at beta.1.remote-trainalgorithmsnow trains the agent's own algorithm instead of nothing (turning the plugin off still stops remote training). The release notes should say so.last_decisionandevaluated.jsonwere written, and a re-staged identical model was skipped.make lintis clean. 1456 package tests pass, plus the release-tooling, real-data and ghost-guide tests.test_gps_serial_reader_recovers_from_a_stalled_linkfails only on my machine (onmaintoo) and passes in CI.🤖 Generated with Claude Code