Skip to content

tools: scorecard_eval — wire the base scorecard into a real eval consumer - #87

Merged
transfix merged 1 commit into
mainfrom
feat/scorecard-eval-cli
Sep 22, 2026
Merged

transfix merged 1 commit into
mainfrom
feat/scorecard-eval-cli

Conversation

@transfix

Copy link
Copy Markdown
Contributor

The base nav_stats collectors (Swarm #84, native #86) and the scorecard (#82) had no production consumer — the corpus aggregation was demonstrated only in tests. This adds a scorecard eval CLI that runs a CoefMLP checkpoint over a scene corpus with the Swarm's base collector and aggregates one NavScorecard: the RF-free fitness row grl-snam uses to rank its own base-policy checkpoints (design §7, the PR5 training bridge).

What

  • grl_snam/tools/scorecard_eval.py — load_model (a grl-snam train .pt or the bias net) + scene_specs (city corpus) + evaluate(scenes/agents/steps/grid/contact_r) → Swarm(collect_stats=True) per scene → episode_stats() → aggregate_nav → NavScorecard. Prints a compact row + the full JSON (the record a campaign ranks on); optional --json. Convention matches the other python -m grl_snam.tools.X tools.
  • tests/test_scorecard_eval.py — a tiny corpus reduces to a well-formed, in-range card; distinct seeds give distinct corpora; the default (no checkpoint) is the bias net.

Validation

3 tests pass and the CLI runs end-to-end (torch 2.12 via the cvcpkg .venv):

[bias-net] scenes=2 runs=32 success=0.000 arrival=0.312 path_ratio=0.452 pen%=0.000 contacts/run=2.969

The scorecard field-mirrors the C++ nav_scorecard + the native collector, so a checkpoint scores identically whichever path evaluates it. Follow-up (optional): register as a grl-snam scorecard-eval Click subcommand; a --native flag to score via NativeSimWorld.

…umer

The base nav_stats collectors (Swarm #84, native #86) and the scorecard (#82) had no
production consumer — the corpus aggregation was demonstrated only in tests. Add a
scorecard eval CLI that runs a CoefMLP checkpoint over a scene corpus with the Swarm's
base collector and aggregates one NavScorecard: the RF-free fitness row grl-snam uses to
rank its own base-policy checkpoints (design §7, PR5 training bridge).

- grl_snam/tools/scorecard_eval.py: load_model (a grl-snam train .pt or the bias net) +
  scene_specs (city corpus) + evaluate(scenes/agents/steps/grid/contact_r) ->
  Swarm(collect_stats=True) per scene -> episode_stats() -> aggregate_nav -> NavScorecard.
  Prints a compact row + the full JSON (the record a campaign ranks on), optional --json.
  Convention matches the other `python -m grl_snam.tools.X` tools (coef_eval/coef_train).
- tests/test_scorecard_eval.py: a tiny corpus reduces to a well-formed, in-range card;
  seeds give distinct corpora; the default (no checkpoint) is the bias net. 3 pass, and
  the CLI runs end-to-end locally (torch 2.12 via the cvcpkg .venv).

The scorecard field-mirrors the C++ nav_scorecard + the native collector, so a checkpoint
scores identically whichever path evaluates it. Follow-up (optional): register as a
`grl-snam scorecard-eval` Click subcommand; a --native flag to score via NativeSimWorld.
@transfix
transfix merged commit 6a67d5d into main Sep 22, 2026
3 checks passed
@transfix
transfix deleted the feat/scorecard-eval-cli branch September 22, 2026 22:11
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