Skip to content

Standardize benchmark warm-up steps - #6764

Closed
AntoineRichard wants to merge 1 commit into
isaac-sim:developfrom
AntoineRichard:antoiner/benchmark-warmup-steps
Closed

AntoineRichard wants to merge 1 commit into
isaac-sim:developfrom
AntoineRichard:antoiner/benchmark-warmup-steps

Conversation

@AntoineRichard

Copy link
Copy Markdown
Collaborator

Summary

  • rename runtime and play --warmup_frames interfaces to --warmup_steps
  • expose the excluded count as runtime.environment_step_timing.warmup_steps
  • use environment_step_warmup_steps consistently in flat benchmark metadata
  • remove the duplicate runtime extra.warmup_frames value

Dependency

Stacked on #6564. Merge #6564 first; the standalone change in this PR is commit f895534e59.

Testing

  • ./isaaclab.sh -p -m pytest source/isaaclab/test/benchmark source/isaaclab/test/cli/test_benchmark_entrypoint.py scripts/benchmarks/test/test_benchmark_smoke.py -k "not training_and_play_write_bundles" -q (241 passed)
  • runtime host-return and synchronized smoke tests (2 passed)
  • RSL-RL training/play end-to-end smoke test (1 passed)
  • ./isaaclab.sh -f

@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Too many files changed for review. (101 files found, 100 file limit)

Bypass the limit by tagging @greptile-apps to review.

@github-actions github-actions Bot added documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels Jul 28, 2026

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isaac Lab Review Bot

Summary

This PR standardizes benchmark warm-up terminology: --warmup_frames becomes --warmup_steps across the runtime and play entrypoints and the four RL backend adapters, the typed BenchmarkRuntimeRequest/BenchmarkPlayRequest fields are renamed, and the excluded count is now surfaced as runtime.environment_step_timing.warmup_steps while the duplicate extra.warmup_frames value is dropped. The rename is applied consistently across parsers, dispatch argv construction, builders, schema, and tests. The main remaining issues are documentation-level (a changelog fragment in the same release still documents the old flag) and test-strength-level (two assertions on the new warmup_steps field compare against the dataclass default, so they cannot detect a broken propagation path).

Architecture impact

Low. The change is a naming/plumbing normalization on top of the already-relocated isaaclab.benchmark package; no new abstractions are introduced. Threading environment_step_warmup_steps through build_runtime into EnvironmentStepTiming is the right place for it, since consumers reading a bundle now have enough information to interpret the measured interval without cross-referencing CLI invocation logs. The added field is defaulted, so existing bundle producers keep constructing valid objects.

Test coverage

Adapter parser tests, CLI dispatch tests, and the runtime/startup smoke tests were all updated to the new flag name, and test_builders.py adds both a positive path (environment_step_warmup_steps reaching EnvironmentStepTiming.warmup_steps) and a negative path (rejecting a negative value). The gap is that the two tests asserting the new bundle field (test_runtime_smoke.py and test_schema.py) both assert 0, which is the schema default, so end-to-end propagation of a non-zero warm-up count is effectively unverified.

Implementation verdict

Minor fixes needed. Posted 5 actionable findings inline.

The PR exceeded the automated context budget, so some file content was truncated.

Automated comment-only review; human maintainers own approval decisions.

assert schema_data["runtime"]["startup_time_s"]["first_step"] > 0.0
timing = schema_data["runtime"]["environment_step_timing"]
assert timing["warmup_steps"] == 0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Warning — Runtime smoke assertion on warmup_steps is vacuous

The benchmark is invoked with --warmup_steps 0 and then asserted with timing["warmup_steps"] == 0. Because EnvironmentStepTiming.warmup_steps defaults to 0, this assertion also passes if the runtime entrypoint never forwards the parsed CLI value into build_runtime(environment_step_warmup_steps=...) — which is precisely the plumbing this PR introduces. Exercise a non-zero warm-up (e.g. --warmup_steps 5), assert that exact value in the bundle, and adjust the environment_step_calls expectation to match the excluded steps. Keeping a second parametrised case at 0 preserves the current zero-warm-up coverage.

launchers, ``isaaclab benchmark``, or
:func:`~isaaclab.benchmark.run_benchmark` instead.
* **Breaking:** Standardized benchmark warm-up arguments. Runtime and play use
``--warmup_frames``, and :class:`~isaaclab.benchmark.BenchmarkPlayRequest` uses

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Warning — Changelog fragment still documents the removed --warmup_frames names

This fragment and antoiner-benchmark-warmup-steps.major.rst are both added in this diff and will be compiled into the same release section. This one tells users that "Runtime and play use --warmup_frames" and that BenchmarkPlayRequest uses warmup_frames; the other says exactly those names were renamed to --warmup_steps / warmup_steps. After this PR no entrypoint accepts --warmup_frames, so the published changelog would hand users two contradictory migration instructions, one of which produces an argparse error. Update this fragment to the final step-based naming, or drop the warm-up bullet here and let the dedicated fragment own it.

Suggested change
``--warmup_frames``, and :class:`~isaaclab.benchmark.BenchmarkPlayRequest` uses
* **Breaking:** Standardized benchmark warm-up arguments. Runtime, play, and
training all use ``--warmup_steps``, and
:class:`~isaaclab.benchmark.BenchmarkRuntimeRequest` and
:class:`~isaaclab.benchmark.BenchmarkPlayRequest` use ``warmup_steps``. Pass the
corresponding option with a value of ``0`` to include every step in timing.

from isaaclab.test.benchmark._cli import validate_warmup_steps
from isaaclab.test.benchmark.metrics import RL_LIBRARY_DESCRIPTORS, parse_tf_logs
from isaaclab.test.benchmark.schema import StartupTime
from isaaclab.benchmark import BaseIsaacLabBenchmark, BenchmarkMonitor, BenchmarkResult, builders, capture, stepping

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Suggestion — Confirm training warm-up bounds check still runs

This import block (and the equivalent blocks in the sb3, skrl, and rl_games training adapters) drops validate_warmup_steps, while isaaclab/benchmark/_cli.py still defines it and source/isaaclab/test/benchmark/test_cli.py still tests it. If the call sites were removed too, a --warmup_steps value at or above the resolved number of measured environment steps is now accepted: the recorder excludes every sample and the problem only surfaces at bundle assembly, after the full training run has been paid for. Please confirm the guard still executes on all four training paths; if it was intentionally dropped, remove the now-unused helper and its tests instead.


def __post_init__(self) -> None:
"""Validate that the timing fields form one consistent measurement mode."""
if self.warmup_steps < 0:
raise ValueError("warmup_steps must be non-negative")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Suggestion — New serialized field added without a schema version bump

warmup_steps changes the on-disk shape of every EnvironmentStepTiming object, but SCHEMA_VERSION stays at "1.2" and the module docstring still describes v1.2. Consumers that reconstruct the dataclass strictly from JSON keys (dashboards, the in-tree Odin harness) have no signal that an additive field appeared. Either bump the schema version alongside the docs/tests, or state explicitly in the schema docstring that v1.2 readers must tolerate additive fields.

@@ -149,6 +149,7 @@ def test_training_bundle_round_trip(tmp_path):
assert data["runtime"]["collection_fps"]["mean"] == pytest.approx(1_142_000.0)
assert data["runtime"]["total_fps"]["mean"] == pytest.approx(1_071_780.0)
timing = data["runtime"]["environment_step_timing"]
assert timing["warmup_steps"] == 0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Suggestion — Schema round-trip does not exercise a non-default warmup_steps

_runtime() constructs EnvironmentStepTiming(...) without passing warmup_steps, so assert timing["warmup_steps"] == 0 only proves the default serializes. A regression that drops the field during serialization (or writes a constant zero) would still pass. Set a non-zero value in the fixture (e.g. warmup_steps=25) and assert it here. A direct pytest.raises(ValueError) case for the new warmup_steps < 0 guard in EnvironmentStepTiming.__post_init__ would also be worth adding, since that validation is currently only reached indirectly through build_runtime.

@AntoineRichard
AntoineRichard force-pushed the antoiner/benchmark-warmup-steps branch from f895534 to c8f83f7 Compare July 28, 2026 18:40
Use step terminology across runtime and play interfaces. Record the excluded count in environment-step timing so schema and flat formatter consumers share one contract.
@AntoineRichard

Copy link
Copy Markdown
Collaborator Author

Superseded by #6769, which consolidates this work and is now the canonical source for review, CI, and merge. Closing this PR to keep discussion and validation centralized there.

AntoineRichard added a commit that referenced this pull request Jul 30, 2026
## Summary

Consolidates the remaining open benchmarking work onto `develop`, which
now
contains #6564 and #6631. This pull request is the canonical source for
review,
CI, and merge; the superseded individual pull requests are closed to
keep
discussion and validation centralized here.

## Superseded pull requests

- #6565 — Fix articulation data micro-benchmarks
- #6566 — Add OVPhysX asset micro-benchmarks
- #6567 — Add OVPhysX sensor micro-benchmarks
- #6568 — Add Newton sensor micro-benchmarks
- #6587 — Document micro-benchmark workflows
- #6595 — Rewrite benchmark user guide
- #6624 — Success series in benchmark schema
- #6627 — Rewrite advanced benchmark framework guide
- #6629 — Unify benchmark documentation journey
- #6764 — Standardize benchmark warm-up steps

## Already landed dependencies

- #6564 — Benchmark library API
- #6631 — Restore RL entrypoint backend state

## Integration notes

- The success-rate learning curve advances the benchmark bundle schema
from
  1.2 to 1.3.
- Runtime and play use `num_steps` and `warmup_steps` consistently.
- Shared asset and sensor suites preserve backend-specific setup while
  centralizing common workload, timing, and reporting behavior.
- The top-level micro-benchmark factory exposes exact physics selectors
and
  runs retained benchmark scripts in child processes.
- The benchmark user, framework, and micro-benchmark guides form one
  documentation path with generated API coverage for public symbols.
- Historical plan/spec commits were excluded from the consolidated
history.

## Verification

- `./isaaclab.sh -f`
- `python3 tools/changelog/cli.py check develop`
- `./isaaclab.sh -d`
- Focused benchmark and RL entrypoint tests: 315 passed, 9 skipped

---------

Co-authored-by: Kelly Guo <[email protected]>
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
## Summary

Consolidates the remaining open benchmarking work onto `develop`, which
now
contains isaac-sim#6564 and isaac-sim#6631. This pull request is the canonical source for
review,
CI, and merge; the superseded individual pull requests are closed to
keep
discussion and validation centralized here.

## Superseded pull requests

- isaac-sim#6565 — Fix articulation data micro-benchmarks
- isaac-sim#6566 — Add OVPhysX asset micro-benchmarks
- isaac-sim#6567 — Add OVPhysX sensor micro-benchmarks
- isaac-sim#6568 — Add Newton sensor micro-benchmarks
- isaac-sim#6587 — Document micro-benchmark workflows
- isaac-sim#6595 — Rewrite benchmark user guide
- isaac-sim#6624 — Success series in benchmark schema
- isaac-sim#6627 — Rewrite advanced benchmark framework guide
- isaac-sim#6629 — Unify benchmark documentation journey
- isaac-sim#6764 — Standardize benchmark warm-up steps

## Already landed dependencies

- isaac-sim#6564 — Benchmark library API
- isaac-sim#6631 — Restore RL entrypoint backend state

## Integration notes

- The success-rate learning curve advances the benchmark bundle schema
from
  1.2 to 1.3.
- Runtime and play use `num_steps` and `warmup_steps` consistently.
- Shared asset and sensor suites preserve backend-specific setup while
  centralizing common workload, timing, and reporting behavior.
- The top-level micro-benchmark factory exposes exact physics selectors
and
  runs retained benchmark scripts in child processes.
- The benchmark user, framework, and micro-benchmark guides form one
  documentation path with generated API coverage for public symbols.
- Historical plan/spec commits were excluded from the consolidated
history.

## Verification

- `./isaaclab.sh -f`
- `python3 tools/changelog/cli.py check develop`
- `./isaaclab.sh -d`
- Focused benchmark and RL entrypoint tests: 315 passed, 9 skipped

---------

Co-authored-by: Kelly Guo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant