Skip to content

test: CLI-train + export + reload the deployable risk/lam coef_mlp - #104

Merged
transfix merged 1 commit into
mainfrom
test/coef-train-lam-deploy
Sep 27, 2026
Merged

transfix merged 1 commit into
mainfrom
test/coef-train-lam-deploy

Conversation

@transfix

Copy link
Copy Markdown
Contributor

The coef-train --rollout bicycle --w-risk --learned-lam deployable path (produces the risk/lam .cvcnav demo3 loads) had no integration test that trains → exports → reloads it — only header-only export checks and torch-Swarm scoring. This adds the grl-snam side of libcvc's NavCoefTrain.TrainThenSaveReloadIntegration:

  • CLI-train a lam net (small fixture: steps=12, n=48, grid=64, w_risk=6) to a .cvcnav.
  • Assert the shipped 6-in risk-only + 4-out lam layout survives export (CVNV, FLAG_FEAT_RISK set, FLAG_FEAT_MU clear) — the exact contract the shipped coef_mlp_riskaware.cvcnav relies on.
  • Reload torch-free via nav_native.coef_mlp_forward and confirm the trained net forwards to (N,4) with a finite, softplus-≥0 learned-lam column.

The load+drive contract (a reloaded risk/lam net drives via drive_step_material) is pinned on the C++ side in libcvc#432; this closes the CLI-path train→export→reload gap. Passes in ~6s (torch train + torch-free reload).

…cvcnav)

Integration test for the coef-train --rollout bicycle --w-risk --learned-lam deployable path (the
grl-snam side of libcvc's NavCoefTrain.TrainThenSaveReloadIntegration): CLI-train a lam net to a
.cvcnav, assert the SHIPPED 6-in risk-only + 4-out lam layout survives export (CVNV, risk flag set,
mu flag clear), then reload it torch-free via nav_native.coef_mlp_forward and confirm it forwards to
(N,4) with a finite, softplus->=0 learned-lam column. The load+DRIVE contract is pinned in libcvc
(NavMaterialDeploy.ShippedRiskOnlyLamNetRoundTripsAndDrives); this closes the gap that the CLI
lam path had no train->export->reload test. Verified: passes in 6s (torch train + torch-free reload).
@transfix
transfix merged commit 892a054 into main Sep 27, 2026
3 checks passed
@transfix
transfix deleted the test/coef-train-lam-deploy branch September 27, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant