Conversation
|
ZenAlexa
left a comment
There was a problem hiding this comment.
The alias is applied inside records_from_stats_file(), after the runtime stats artifact has already been written. Cam2V's StepResult.metrics therefore continues to contain model_step_wall_s/chunk_fps and omits total_s, so the raw artifact and every direct consumer keep the non-canonical contract described in #564; the first acceptance criterion remains open. I added assert result.metrics["total_s"] == result.metrics["model_step_wall_s"] to test_model_loop_maps_wasd_to_shared_camera_input_and_metrics, and the PR head fails with KeyError: 'total_s'. Assigning total_s beside model_step_wall_s in Cam2VModelLoop.step() gives every consumer the canonical key. This parser alias can also remain for historical artifacts.
|
You're right, the alias only patched the ingest path, so StepResult.metrics itself never got total_s. Pushed 7f1270a: Cam2VModelLoop.step() now sets total_s alongside model_step_wall_s at the source, and the parser alias stays for historical artifacts. Added your assertion to the existing WASD test: fails with KeyError: 'total_s' on the prior commit, passes now. Ran it CPU-only (torch cpu wheel, no GPU here) along with the rest of test_application.py and test_benchmark_harness.py, 59 passed, 1 skipped, ruff clean on both files. |
ZenAlexa
left a comment
There was a problem hiding this comment.
Cam2V now emits total_s in the producer, and the parser preserves an explicit canonical value. The runtime-metrics and runtime-records tests pass at 7f1270a8 (59 passed, 1 skipped); restoring the previous producer reproduces KeyError: 'total_s' in the regression. The raw artifact, throughput summary, and report paths now share the metric.
7f1270a to
3cd9561
Compare
| "postprocess_enabled": int(state.postprocess_enabled), | ||
| "postprocess_comparison": int(state.config.postprocess_comparison), | ||
| "postprocess_output_frames": postprocess_output_frame_count, | ||
| "total_s": model_step_wall_s, |
There was a problem hiding this comment.
Postprocessing Time Is Excluded
When post-processing is enabled, StepResult.frame_count counts the presented post-processed frames, but total_s is set to the model-only duration and excludes the time measured by postprocess_step_wall_s. The benchmark then divides the post-processed frame count by model-only time, which overstates throughput; buffered output and final-tail frames can further distort individual steps. Use the complete loop duration for total_s, or pair the model-only duration with the model-generated frame count.
…ples Cam2V reports its per-step duration as model_step_wall_s and chunk_fps instead of the benchmark tooling's canonical total_s/model_step_s. _generated_fps_for_step and _generated_fps_summary only ever check total_s (falling back to model_step_s), and harness.py's run highlights read total_s directly, so LingBot's Cam2V scenarios never get a derived generated_fps and their step-time/throughput headline cards render empty. The runtime-metric-samples ingest path (_records_from_runtime_metric_samples) has no key-normalization step at all, unlike the stats-rows path, which already renames vendor-specific keys via _KEY_OVERRIDES. Add a small, additive alias step that backfills total_s from model_step_wall_s when a step doesn't already report total_s directly, leaving the app-reported key in place. Every downstream reader of total_s already exists (_generated_fps_for_step, _generated_fps_summary, harness.py's highlights, report.py's headline cards) and needs no change. Refs NVIDIA#564 Signed-off-by: Amir Fathi <amirfathi.me@gmail.com>
3cd9561 to
778e848
Compare
|
Rebased onto main. #607 (merged after this PR was opened) rewrote That leaves the deeper gap open: Cam2V's runtime metric samples carry none of the per-step timing fields post-#607, not just |
|
This rebased cleanly onto the new metrics flow five days ago and hasn't had a maintainer look yet, flagging it in case it slipped by. |
Refs #564
Cam2V's session.py reports its per-step duration and rate as
model_step_wall_s/chunk_fps, and_generated_fps_for_step/_generated_fps_summaryonly ever look attotal_s(falling back tomodel_step_s), so LingBot's Cam2V scenarios never get a derivedgenerated_fps, andharness.py'stotal_shighlights come up empty too.I went with the "report
total_salongside the existing key" option rather than renaming: the runtime-metric-samples ingest path had no key-normalization step at all (unlike the stats-rows path, which already has_KEY_OVERRIDESfor this), so I added a small alias step there that backfillstotal_sfrommodel_step_wall_swhen a step doesn't already reporttotal_s.model_step_wall_sstays in the output. Oncetotal_sis present, the existing fallback in_generated_fps_for_step/_generated_fps_summaryderivesgenerated_fpson its own, andharness.py'stotal_s_median/startup_step_total_shighlights andreport.py's headline cards pick it up with no changes needed there.This covers the LingBot scenarios dropping
generated_fpsand the headline cards, not the regression-gate part of the issue (the metric name lists that skip instead of failing). I couldn't find that gate's config in this repo, so if it lives in an internal tool this half may need a separate change there.Added
test_runtime_benchmark_stats_backfills_total_s_from_model_step_wall_s: feeds amodel_step_wall_s/chunk_fpssample throughrecords_from_stats_fileand checks bothtotal_sandgenerated_fpscome out. The new test fails without the change. The existing runtime-metric-samples tests (group-by-step, warmup exclusion, the v2 sink one) still pass unchanged.Couldn't run the full suite locally, this workspace needs CUDA/transformer-engine to build. Checked the change with ruff (check and format, both clean) and by loading
tools/benchmarks/metrics.pydirectly with no other project dependencies, since the module itself only imports the standard library.