Repository navigation
tools: scorecard_eval — wire the base scorecard into a real eval consumer - #87
Merged
Merged
Conversation
…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.
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 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(agrl-snam train.ptor 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 otherpython -m grl_snam.tools.Xtools.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):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 agrl-snam scorecard-evalClick subcommand; a--nativeflag to score viaNativeSimWorld.