Commit 8a2df0c
Promote benchmarks to library API (#6564)
# Description
Promotes the benchmark framework from `isaaclab.test.benchmark` to the
public `isaaclab.benchmark` package. Runtime, startup, training, play,
and RL backend workflows become library entrypoints with typed
in-process dispatch.
The transitional import and script shims were removed from this PR to
keep the move reviewable and leave one implementation for each workflow.
This is an intentional breaking change: callers must replace
`isaaclab.test.benchmark` imports with `isaaclab.benchmark` and use
`isaaclab benchmark` instead of the former runtime, startup, training,
and play scripts.
## Highlights
- Adds typed runtime, startup, training, and play request objects and
`run_benchmark` convenience APIs.
- Returns workflow-specific result types such as
`BenchmarkResult[RuntimeBundle]`.
- Adds in-process `isaaclab benchmark` CLI dispatch.
- Moves the supported benchmark workflows and RL backend adapters into
the package.
- Removes the duplicate `isaaclab.test.benchmark` namespace and
standalone workflow forwarding scripts.
- Restores process-global Torch, SKRL, and RL Games state and closes
environments safely across repeated calls.
- Rejects schema finalization without an attached typed bundle instead
of reporting a nonexistent output.
- Carries forward #6474 validation: positive workloads, non-negative
warm-up counts, one default train/play warm-up step, and
`--measure_sync_step`.
- Adds public API documentation, migration guidance, tests, and
changelog fragments.
## Dependencies
- Direct dependency: #6474.
- Satisfied prerequisite: #6553, already merged, provides reusable RL
train/play entrypoints.
## Breaking migration
- `from isaaclab.test.benchmark ...` becomes `from isaaclab.benchmark
...`.
- `scripts/benchmarks/{runtime,startup,training,play}.py` becomes
`isaaclab benchmark {runtime,startup,training,play}`.
- Per-library train/play scripts become the unified training/play
commands with `--rl_library`.
- Independent camera, loading, Hydra, and other standalone benchmarks
remain unchanged.
## Type of change
- New feature
- Breaking API migration
- Documentation update
## Validation
- Focused benchmark API, CLI, parser, adapter, and early-stop suite: 265
passed, 4 simulator smoke cases deselected.
- Focused public API and CLI entrypoint suite: 26 passed.
- `./isaaclab.sh -f`: all applicable hooks pass. The conflict-marker
hook was skipped because current `develop` contains literal `=======`
headings in three third-party license files.
- `tools/changelog/cli.py check develop`: passed.
- Runtime/startup smoke tests now invoke `uv run isaaclab benchmark`;
the local clean-`uv` bootstrap exceeded the validation window while
downloading the CUDA environment, so CI remains the end-to-end CLI
confirmation.
## Checklist
- [x] I have read and understood the contribution guidelines
- [x] I have run the pre-commit checks
- [x] I have made corresponding documentation changes
- [x] My changes generate no new warnings
- [x] I have added tests for the public API and canonical CLI paths
- [x] I have added the required changelog fragments
- [x] I have documented the intentional breaking migration
- [x] My name already exists in `CONTRIBUTORS.md`
---------
Co-authored-by: Mustafa Haiderbhai <mhaiderbhai@nvidia.com>1 parent 44a522d commit 8a2df0c
100 files changed
Lines changed: 3311 additions & 1666 deletions
File tree
- docs
- source
- api
- lab
- migration
- testing
- scripts/benchmarks
- test
- source
- isaaclab_newton
- benchmark/assets
- changelog.d
- isaaclab_physx
- benchmark/assets
- changelog.d
- isaaclab_rl
- changelog.d
- isaaclab_rl/entrypoints
- isaaclab
- changelog.d
- isaaclab
- benchmark
- entrypoints
- backends
- rl_games
- rsl_rl
- sb3
- skrl
- recorders
- cli
- test
- benchmark
- cli
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
| 262 | + | |
262 | 263 | | |
263 | 264 | | |
264 | 265 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
958 | 958 | | |
959 | 959 | | |
960 | 960 | | |
961 | | - | |
| 961 | + | |
962 | 962 | | |
963 | 963 | | |
964 | 964 | | |
| |||
1946 | 1946 | | |
1947 | 1947 | | |
1948 | 1948 | | |
1949 | | - | |
1950 | | - | |
| 1949 | + | |
| 1950 | + | |
1951 | 1951 | | |
1952 | 1952 | | |
1953 | | - | |
| 1953 | + | |
1954 | 1954 | | |
1955 | 1955 | | |
1956 | 1956 | | |
1957 | 1957 | | |
1958 | 1958 | | |
1959 | 1959 | | |
1960 | 1960 | | |
1961 | | - | |
1962 | | - | |
| 1961 | + | |
| 1962 | + | |
1963 | 1963 | | |
1964 | | - | |
| 1964 | + | |
1965 | 1965 | | |
1966 | | - | |
| 1966 | + | |
1967 | 1967 | | |
1968 | | - | |
| 1968 | + | |
1969 | 1969 | | |
1970 | 1970 | | |
1971 | | - | |
| 1971 | + | |
1972 | 1972 | | |
1973 | 1973 | | |
1974 | | - | |
| 1974 | + | |
1975 | 1975 | | |
1976 | 1976 | | |
1977 | 1977 | | |
1978 | | - | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
1979 | 1984 | | |
1980 | 1985 | | |
1981 | 1986 | | |
| |||
2001 | 2006 | | |
2002 | 2007 | | |
2003 | 2008 | | |
2004 | | - | |
| 2009 | + | |
2005 | 2010 | | |
2006 | | - | |
| 2011 | + | |
2007 | 2012 | | |
2008 | | - | |
| 2013 | + | |
2009 | 2014 | | |
2010 | | - | |
| 2015 | + | |
2011 | 2016 | | |
2012 | | - | |
| 2017 | + | |
2013 | 2018 | | |
2014 | | - | |
| 2019 | + | |
2015 | 2020 | | |
2016 | | - | |
| 2021 | + | |
2017 | 2022 | | |
2018 | 2023 | | |
2019 | | - | |
2020 | | - | |
| 2024 | + | |
| 2025 | + | |
2021 | 2026 | | |
2022 | 2027 | | |
2023 | 2028 | | |
2024 | 2029 | | |
2025 | 2030 | | |
2026 | 2031 | | |
2027 | | - | |
| 2032 | + | |
2028 | 2033 | | |
2029 | 2034 | | |
2030 | 2035 | | |
| |||
2061 | 2066 | | |
2062 | 2067 | | |
2063 | 2068 | | |
2064 | | - | |
2065 | | - | |
2066 | | - | |
2067 | | - | |
2068 | | - | |
2069 | | - | |
2070 | | - | |
2071 | | - | |
2072 | | - | |
2073 | | - | |
2074 | | - | |
2075 | | - | |
2076 | | - | |
2077 | | - | |
2078 | | - | |
2079 | | - | |
2080 | | - | |
2081 | | - | |
2082 | | - | |
2083 | | - | |
2084 | | - | |
2085 | | - | |
2086 | | - | |
2087 | | - | |
2088 | | - | |
| 2069 | + | |
2089 | 2070 | | |
2090 | | - | |
2091 | | - | |
| 2071 | + | |
| 2072 | + | |
2092 | 2073 | | |
2093 | | - | |
2094 | | - | |
| 2074 | + | |
| 2075 | + | |
2095 | 2076 | | |
2096 | | - | |
2097 | | - | |
2098 | | - | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
2099 | 2080 | | |
2100 | | - | |
2101 | | - | |
| 2081 | + | |
| 2082 | + | |
2102 | 2083 | | |
2103 | | - | |
2104 | | - | |
| 2084 | + | |
| 2085 | + | |
2105 | 2086 | | |
2106 | 2087 | | |
2107 | 2088 | | |
| |||
2112 | 2093 | | |
2113 | 2094 | | |
2114 | 2095 | | |
2115 | | - | |
2116 | | - | |
2117 | | - | |
2118 | | - | |
2119 | | - | |
2120 | | - | |
2121 | | - | |
2122 | | - | |
2123 | | - | |
2124 | | - | |
2125 | | - | |
2126 | | - | |
2127 | | - | |
| 2096 | + | |
2128 | 2097 | | |
2129 | | - | |
2130 | | - | |
2131 | | - | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
2132 | 2101 | | |
2133 | 2102 | | |
2134 | 2103 | | |
2135 | 2104 | | |
2136 | 2105 | | |
2137 | 2106 | | |
2138 | | - | |
2139 | | - | |
2140 | | - | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
2141 | 2113 | | |
2142 | | - | |
| 2114 | + | |
2143 | 2115 | | |
2144 | 2116 | | |
2145 | 2117 | | |
2146 | 2118 | | |
2147 | | - | |
| 2119 | + | |
2148 | 2120 | | |
2149 | 2121 | | |
2150 | 2122 | | |
2151 | | - | |
| 2123 | + | |
2152 | 2124 | | |
2153 | 2125 | | |
2154 | | - | |
| 2126 | + | |
2155 | 2127 | | |
2156 | 2128 | | |
2157 | 2129 | | |
| |||
0 commit comments