Repository navigation
Does base GRL-SNAM's policy learn? The coef_sdf learning check, and E1 (planted dissipation) - #172
Merged
Merged
Conversation
… planted dissipation - grl-snam train: --history, --checkpoint-every (<out>.stepNNNNNN.pt, step 0 included) and --val-frac (whole blocks of the region held out; every checkpoint scores fixed held-out pairs, the objective's terms and the seek drive; <out>.best_heldout.pt on held-out reach), plus --device. With the history and checkpoints on, the weights are bit-identical; seed 0 at 200 steps on the CPU reproduces grl-snam-weights' coef_sdf.pt. - grl_snam/tools/sdf_eval.py: the block split, held-out pairs, the objective's terms and a batched seek drive (reach, time to goal, path, clearance, penetration, end gap). - learning_history: a fitness may return its held-out terms (recorded as "heldout"); checkpoint_ext for trainers that save .pt. - spline_stagewise6: gamma_o_regions (damping by the centre's x) and fric_mu (the hard-coded 0.1, still the default); make_checkpoint logs gamma_o_true. - train_coef_energy: --planted (per-region truth / mean / rel_err and the ratio on held-out windows), an init record and init.pt for the untrained net, and the held-out scoring forks the CUDA RNG too. - experiments/learning_proof/: the arms, the paired bootstrap, the curves, E1's data and ceiling.
…sdf, and E1 A null, and on held-out scenes a negative: the published coef_sdf is its untrained net; the retrain clips every step and its held-out picks are worse than untrained on their own held-out objective; their Austin reach gain is a mean shift a constant reproduces, and on the city they reach less. E1 stops at its ceiling: the surrogate's best scalar damping is 93-97% off the planted gamma. Every table's files and commands are in docs/learning-validation/.
transfix
added a commit
that referenced
this pull request
Nov 13, 2026
…rms, metrics, init) Found running learn-report on the five real retrain histories of the base-measure work (its PR #172): - A held-out <prefix>_<term> (grl-snam train's obj_goal) with no exact twin pairs with the training <term>; without it no objective term had a twin. - A held-out value with a training twin is a loss term; the loss claims are made on those (and on fitness) only. Held-out metrics with no twin (reach, path_m, min_clear_m, ...) get marks and are listed under untested, instead of a claim with a guessed direction: reach and min_clear_m read as lower-is-better before. HIGHER_IS_BETTER and a header `maximize` list give a metric's direction for its marks. - An `init` record (train_coef_energy's untrained evaluation before epoch 0) joins the first evaluated kind's series one before its first x, so the untrained net is the first point. - `planted` values are not loss terms (the planted claims read them). - One run needs 5 evaluations for a loss claim to pass (the noise floor needs them); its margin is now max(delta * IQR, z * noise). Fixtures: sdf_train_history.jsonl (a subset of retrain seed 0) and coef_energy_history_planted.jsonl (the E1 pipeline history), both from #172.
transfix
added a commit
that referenced
this pull request
Nov 13, 2026
… learn-report (Phase 1a, 1b) (#171) * grl_snam.learning: read learning histories, mark held-out curves, compare arms, report claims Phase 1a and 1b of the learning proof: is a learner learning, or fitting noise? Held-out data, against an untrained arm and a constant arm. - grl_snam/learning/history.py: load(paths, follow=False) reads any trainer's JSON-lines history by the shared conventions (kind, step/epoch, train/terms beside heldout, heads.<g>.*, grad_norm, best*, blob/checkpoint), no per-schema adapter: series <kind>.<path>, the header as meta, a checkpoint table with the pick, train/held-out term pairs, band() across seeds, and an mtime/size re-read that tolerates a half-written last line. - grl_snam/learning/curves.py: best, Kneedle elbow, plateau (windowed Theil-Sen change against the curve's IQR) and divergence after best, on a 5-point running median, each threshold with a noise floor (robust sd of the second differences) so a flat noisy curve gets no elbow and no divergence. - grl_snam/learning/stats.py: the downstream A/B harness's percentile bootstrap, draw for draw (5000 resamples, one seeded generator), and paired differences that keep pairs together. - grl_snam/learning/arms.py + tools/arms_eval.py: arms NAME=PATH|const:..., scored on paired held-out seeds through coef_eval and scorecard_eval, written as grl_snam.arms/v1 (the harness's JSON shape plus per-seed values, direction and primary metrics). - grl_snam/learning/report.py + `grl-snam learn-report`: loss, selection, task and planted claims, each pass or fail, plus the curves' marks and the checkpoint tables. - tools/coef_export.py: --constant (a CoefMLP with zero weights whose output bias is the inverse activation of each constant, to .cvcnav or .pt) and read_coef_mlp (.cvcnav back to torch). - tools/scorecard_eval.py: episodes(model, seeds) gives the per-scene stats evaluate() reduces. - tests/learning/*, tests/fixtures/learning_history/* (five writers' layouts, downstream ones with neutral names), tests/fixtures/learning_marks_golden.json (tools/learning_marks_golden.py regenerates and checks it). * learning: read grl-snam train's and E1's histories right (prefixed terms, metrics, init) Found running learn-report on the five real retrain histories of the base-measure work (its PR #172): - A held-out <prefix>_<term> (grl-snam train's obj_goal) with no exact twin pairs with the training <term>; without it no objective term had a twin. - A held-out value with a training twin is a loss term; the loss claims are made on those (and on fitness) only. Held-out metrics with no twin (reach, path_m, min_clear_m, ...) get marks and are listed under untested, instead of a claim with a guessed direction: reach and min_clear_m read as lower-is-better before. HIGHER_IS_BETTER and a header `maximize` list give a metric's direction for its marks. - An `init` record (train_coef_energy's untrained evaluation before epoch 0) joins the first evaluated kind's series one before its first x, so the untrained net is the first point. - `planted` values are not loss terms (the planted claims read them). - One run needs 5 evaluations for a loss claim to pass (the noise floor needs them); its margin is now max(delta * IQR, z * noise). Fixtures: sdf_train_history.jsonl (a subset of retrain seed 0) and coef_energy_history_planted.jsonl (the E1 pipeline history), both from #172.
This was referenced Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The learning check (held-out per-term losses, the task metric with paired-seed CIs, a planted latent; each against untrained and constant arms) for base GRL-SNAM's public policy,
grl-snam-weights'coef_sdf.pt. Results:docs/learning-validation.md, with every table's files and commands indocs/learning-validation/.The answer: a null, and on held-out scenes a negative
coef_sdf.ptis an untrained net.grl-snam trainat seed 0 for 200 steps on the CPU reproduces it bit for bit. On every scorer it ties its step-0 net and a constant net (Austin reach −0.2 points [−0.5, +0.2] vs untrained).nsub1.sim_worldnavigator, paid in clearance (−1.8 m).scorecard_evalandsim_worldagree.Recommendation: do not republish
grl-snam-weightson these runs.Code
grl-snam train:--history,--checkpoint-everyand--val-frac(whole blocks held out; each checkpoint scores the objective's terms and the seek drive; keeps<out>.best_heldout.pt), plus--device. With the instruments on, the weights are bit-identical.grl_snam/tools/sdf_eval.pyholds the split, pairs, terms and the batched seek drive.learning_history: a fitness may return its held-out terms.checkpoint_extserves trainers that save.pt.spline_stagewise6:gamma_o_regions, andfric_mu(default 0.1, the old hard-coded value).make_checkpointlogsgamma_o_true.stagewise_dataset's Case-2 robot perturbation already set and loggedfric_mu(0.05–0.30), but the step ignored it. It now takes effect.train_coef_energy:--planted(per-region truth / mean / rel_err and the ratio on held-out windows), aninitrecord andinit.pt. The held-out scoring now forks the CUDA RNG too.experiments/learning_proof/: arms, objective, curves, paired bootstrap,coef_evalwith CIs, E1's data and ceiling.coef_export --constant, so this branch does not touchcoef_export; the scripts build the constant arm themselves.Tests
tests/test_sdf_train_instruments.py,tests/test_stagewise_planted.py, plus additions totest_learning_history.pyandtest_coef_energy_heldout.py.grl-snam-cp312cvcpkg closure: 1046 passed, 19 skipped. black 26.5.1 and ruff are clean.Found, not fixed here
stagewise_dataset.py'smain()writes every episode's checkpoints to one shared file, so its manifest's records all read the last episode.import pycvcfails without them.Merge on Joe's OK.