Evaluation and logs
Use this sub-skill when the task starts with an existing AlpaSim run, .asl log,
rollout directory, metrics parquet, evaluation configuration, trajectory, map,
or diagnostic video. It is for reading, scoring, aggregating, and explaining
outputs—not for starting the simulator or fixing controller, physics, traffic,
renderer, or deployment services.
Route first
- Runtime production, replay service orchestration, daemon health, or timing
failures: route to
runtime-services.
- Wizard setup, scene/model acquisition, Docker/Slurm deployment, or run
creation: route to
simulation-wizard.
- Driver policy/model implementation: route to
drivers-and-plugins.
- Controller, physics, or traffic implementation: route to
control-physics-traffic.
- Proto compilation, generated stubs, or contributor tooling: route to
grpc-and-developer-tools.
Keep this sub-skill for the evidence and post-run analysis boundary.
Choose the smallest workflow
- Identify the run root and whether it is a single job or an array-job parent.
A single job has
eval-config.yaml at its root; an array parent has child
job directories containing that file. Confirm wizard-config.yaml is
present before using automatic re-evaluation.
- Locate complete rollouts under
rollouts/<scene-or-clip-id>/<rollout-id>/.
Treat a rollout as complete only when its _complete marker exists. Expect
rollout.asl, optional metrics.parquet, and optional .mp4 files there.
- For a quick log diagnosis, read the ASL format reference
and use the bundled
scripts/print_asl.py. Start with --just-types, a
narrow --start/--end range, and selected
--message-types; payloads containing images or video-model bytes are
redacted before printing. Use --strict when truncation must fail loudly.
- For camera inspection, use
scripts/asl_to_frames.py with a quoted recursive
glob. Choose --format frames for bounded file inspection or --format mp4
when ffmpeg/imageio is available. Keep --max-files and
--max-concurrency bounded for large run trees.
- For post-evaluation, run the documented module form in
evaluation workflows. Read
geometry and utilities before
comparing trajectories or maps. Evaluation
requires the resolved YAML, complete ASLs, and a matching USDZ glob when
map-backed metrics or videos are enabled. It writes per-rollout parquet
beside each ASL.
- Aggregate only after all intended jobs have metrics. The aggregation step
discovers
rollouts/**/metrics.parquet, writes the aggregate tree, and may
create relative video links. For a prior run, prefer python -m eval.reeval
or the equivalent installed re-evaluation command; never submit scheduler
work from this sub-skill without an explicit user request.
Read the data correctly
- ASL is a big-endian, four-byte size-delimited protobuf stream of
LogEntry
messages. The first meaningful message should be rollout_metadata; actor
poses are timestamped and include EGO. Requests/returns, camera images,
routes, and traffic predictions are additional evidence.
- Use timestamps (
timestamp_us) rather than list positions when correlating
poses, plans, camera frames, and metrics. async_read_pb_log() is tolerant
by default: a short final frame logs a warning and stops. Set
raise_on_malformed=True for diagnosis or validation.
- Evaluation loads ASL through
load_scenario_eval_input_from_asl(), then
ScenarioEvaluator(EvalConfig).evaluate(...) returns per-timestep
MetricReturn values, aggregated values, and a Polars metrics dataframe.
Missing rollout metadata, actor definitions, ground truth, or required
response/camera data can make a metric unavailable or the input invalid.
- Map-dependent offroad and video analysis need a discoverable USDZ artifact
and compatible map data. Without a vector map, aggregation supplies an
offroad=0.0 fallback and records a warning; do not interpret that as proof
that offroad was measured.
Interpret outputs
Use metrics and videos for the complete
metric and output contract. In short: per-rollout metrics live next to the ASL;
aggregate/metrics_results.txt, metrics_results.parquet,
metrics_unprocessed.parquet, results-summary.json, and
metrics_results.png summarize a run. Videos are named from clip, rollout,
camera, and layout identifiers and are organized under aggregate/videos/.
Inspect the raw parquet and the modifiers recorded in the text summary before
comparing runs.
Programmatic analysis
- Use
alpasim_utils.logs.read_trajectory() for a scene name plus the EGO
trajectory extracted from actor-pose messages. It returns None when there
are no usable actor poses or no metadata scene id.
- Use
alpasim_utils.geometry for gRPC conversion, Pose, Polyline, and
timestamped Trajectory. Internally, quaternion arrays are (x, y, z, w);
gRPC fields are addressed as (w, x, y, z). Preserve the rig-to-AABB-center
transform from rollout metadata before comparing map or vehicle geometry.
- Use
Trajectory.interpolate_pose() only inside its time range (a one-pose
trajectory accepts its exact timestamp); sort or validate timestamps before
constructing trajectories. Use Shapely objects for 2-D intersections and
distances, and state when z is intentionally ignored.
- Treat the Rust-backed
utils_rs types as an optional native boundary: verify
that the extension and generated protobufs import before relying on geometry
helpers. The Python evaluation path is not a substitute for a missing map,
renderer, ffmpeg, or model asset.
Safe checks and failure recovery
Run python -m ... --help, import checks, and bounded fixture checks before a
large evaluation. Do not run the original checkout's setup, asset download,
Docker build, Slurm submission, or credentialed model acquisition from here.
Use troubleshooting for install/import,
optional backend, data/config, CLI/API, and workflow failures. When evidence
is incomplete, report the exact missing message, asset, marker, config field,
or backend rather than filling in a metric or claiming a successful run.
Bundled helpers
scripts/print_asl.py: bounded, redacted protobuf inspection; safe and
read-only.
scripts/asl_to_frames.py: bounded extraction to images or MP4; writes only
under the requested output directory and never downloads data.
scripts/check_run_metadata.py: read-only single/array-job layout and ASL
metadata checker; it does not load USDZ maps or rewrite configs.
The package's print-asl and asl-to-frames console launchers currently
request a main symbol that the installed modules do not define. Use
python -m alpasim_utils.print_asl and python -m alpasim_utils.asl_to_frames
(or these bundled helpers) until packaging is corrected. The evaluation,
aggregation, and re-evaluation module entry points expose main and their
python -m forms are the portable fallback.
1---2name: evaluation-and-logs3description: "Inspect AlpaSim ASL rollouts, extract camera streams, evaluate and4 aggregate metrics, re-evaluate completed runs, render diagnostic videos, and5 analyze trajectories, maps, and geometry without producing new simulations."6disable-model-invocation: true7metadata:8 source: https://skillmd.com/skills/vectorspacelab/evaluation-and-logs9 disco-role: operating10license: Apache 2.011---1213# Evaluation and logs1415Use this sub-skill when the task starts with an existing AlpaSim run, `.asl` log,16rollout directory, metrics parquet, evaluation configuration, trajectory, map,17or diagnostic video. It is for reading, scoring, aggregating, and explaining18outputs—not for starting the simulator or fixing controller, physics, traffic,19renderer, or deployment services.2021## Route first2223- **Runtime production, replay service orchestration, daemon health, or timing24 failures:** route to `runtime-services`.25- **Wizard setup, scene/model acquisition, Docker/Slurm deployment, or run26 creation:** route to `simulation-wizard`.27- **Driver policy/model implementation:** route to `drivers-and-plugins`.28- **Controller, physics, or traffic implementation:** route to29 `control-physics-traffic`.30- **Proto compilation, generated stubs, or contributor tooling:** route to31 `grpc-and-developer-tools`.3233Keep this sub-skill for the evidence and post-run analysis boundary.3435## Choose the smallest workflow36371. Identify the run root and whether it is a single job or an array-job parent.38 A single job has `eval-config.yaml` at its root; an array parent has child39 job directories containing that file. Confirm `wizard-config.yaml` is40 present before using automatic re-evaluation.412. Locate complete rollouts under `rollouts/<scene-or-clip-id>/<rollout-id>/`.42 Treat a rollout as complete only when its `_complete` marker exists. Expect43 `rollout.asl`, optional `metrics.parquet`, and optional `.mp4` files there.443. For a quick log diagnosis, read the [ASL format reference](references/asl-format.md)45 and use the bundled `scripts/print_asl.py`. Start with `--just-types`, a46 narrow `--start/--end` range, and selected47 `--message-types`; payloads containing images or video-model bytes are48 redacted before printing. Use `--strict` when truncation must fail loudly.494. For camera inspection, use `scripts/asl_to_frames.py` with a quoted recursive50 glob. Choose `--format frames` for bounded file inspection or `--format mp4`51 when ffmpeg/imageio is available. Keep `--max-files` and52 `--max-concurrency` bounded for large run trees.535. For post-evaluation, run the documented module form in54 [evaluation workflows](references/evaluation-workflows.md). Read55 [geometry and utilities](references/geometry-and-utilities.md) before56 comparing trajectories or maps. Evaluation57 requires the resolved YAML, complete ASLs, and a matching USDZ glob when58 map-backed metrics or videos are enabled. It writes per-rollout parquet59 beside each ASL.606. Aggregate only after all intended jobs have metrics. The aggregation step61 discovers `rollouts/**/metrics.parquet`, writes the aggregate tree, and may62 create relative video links. For a prior run, prefer `python -m eval.reeval`63 or the equivalent installed re-evaluation command; never submit scheduler64 work from this sub-skill without an explicit user request.6566## Read the data correctly6768- ASL is a big-endian, four-byte size-delimited protobuf stream of `LogEntry`69 messages. The first meaningful message should be `rollout_metadata`; actor70 poses are timestamped and include `EGO`. Requests/returns, camera images,71 routes, and traffic predictions are additional evidence.72- Use timestamps (`timestamp_us`) rather than list positions when correlating73 poses, plans, camera frames, and metrics. `async_read_pb_log()` is tolerant74 by default: a short final frame logs a warning and stops. Set75 `raise_on_malformed=True` for diagnosis or validation.76- Evaluation loads ASL through `load_scenario_eval_input_from_asl()`, then77 `ScenarioEvaluator(EvalConfig).evaluate(...)` returns per-timestep78 `MetricReturn` values, aggregated values, and a Polars metrics dataframe.79 Missing rollout metadata, actor definitions, ground truth, or required80 response/camera data can make a metric unavailable or the input invalid.81- Map-dependent offroad and video analysis need a discoverable USDZ artifact82 and compatible map data. Without a vector map, aggregation supplies an83 `offroad=0.0` fallback and records a warning; do not interpret that as proof84 that offroad was measured.8586## Interpret outputs8788Use [metrics and videos](references/metrics-and-videos.md) for the complete89metric and output contract. In short: per-rollout metrics live next to the ASL;90`aggregate/metrics_results.txt`, `metrics_results.parquet`,91`metrics_unprocessed.parquet`, `results-summary.json`, and92`metrics_results.png` summarize a run. Videos are named from clip, rollout,93camera, and layout identifiers and are organized under `aggregate/videos/`.94Inspect the raw parquet and the modifiers recorded in the text summary before95comparing runs.9697## Programmatic analysis9899- Use `alpasim_utils.logs.read_trajectory()` for a scene name plus the EGO100 trajectory extracted from actor-pose messages. It returns `None` when there101 are no usable actor poses or no metadata scene id.102- Use `alpasim_utils.geometry` for gRPC conversion, `Pose`, `Polyline`, and103 timestamped `Trajectory`. Internally, quaternion arrays are `(x, y, z, w)`;104 gRPC fields are addressed as `(w, x, y, z)`. Preserve the rig-to-AABB-center105 transform from rollout metadata before comparing map or vehicle geometry.106- Use `Trajectory.interpolate_pose()` only inside its time range (a one-pose107 trajectory accepts its exact timestamp); sort or validate timestamps before108 constructing trajectories. Use Shapely objects for 2-D intersections and109 distances, and state when z is intentionally ignored.110- Treat the Rust-backed `utils_rs` types as an optional native boundary: verify111 that the extension and generated protobufs import before relying on geometry112 helpers. The Python evaluation path is not a substitute for a missing map,113 renderer, ffmpeg, or model asset.114115## Safe checks and failure recovery116117Run `python -m ... --help`, import checks, and bounded fixture checks before a118large evaluation. Do not run the original checkout's setup, asset download,119Docker build, Slurm submission, or credentialed model acquisition from here.120Use [troubleshooting](references/troubleshooting.md) for install/import,121optional backend, data/config, CLI/API, and workflow failures. When evidence122is incomplete, report the exact missing message, asset, marker, config field,123or backend rather than filling in a metric or claiming a successful run.124125## Bundled helpers126127- `scripts/print_asl.py`: bounded, redacted protobuf inspection; safe and128 read-only.129- `scripts/asl_to_frames.py`: bounded extraction to images or MP4; writes only130 under the requested output directory and never downloads data.131- `scripts/check_run_metadata.py`: read-only single/array-job layout and ASL132 metadata checker; it does not load USDZ maps or rewrite configs.133134The package's `print-asl` and `asl-to-frames` console launchers currently135request a `main` symbol that the installed modules do not define. Use136`python -m alpasim_utils.print_asl` and `python -m alpasim_utils.asl_to_frames`137(or these bundled helpers) until packaging is corrected. The evaluation,138aggregation, and re-evaluation module entry points expose `main` and their139`python -m` forms are the portable fallback.