Success series in benchmark schema#6624
Conversation
Greptile SummaryThis PR extends the benchmark schema from v1.0 to v1.1 by adding an optional
Confidence Score: 3/5The schema and builder changes are clean and additive; the four adapter rewirings are mechanical and correct. The smoke test removes per-library guards that existed specifically because rl_games and rsl_rl do not emit a success metric on the Cartpole task, replacing them with unconditional assertions that would fail in CI for those two libraries. The core implementation — schema dataclass, builder helper, and adapter wiring — is straightforward and well-tested at the unit level. The risk lives entirely in the smoke test rewrite: removing the scripts/benchmarks/test/test_benchmark_smoke.py — the unconditional success assertions at lines 106-110 need to be guarded or the parametrisation needs confirmation that all four libraries now produce success data on the Cartpole task. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Training Adapter] --> B[get_success_tracker]
B -->|tracker not None| C[tracker.history]
B -->|tracker is None| D[success_rate_series = None]
C --> E[build_learning]
D --> E
E --> F{success_rates non-empty?}
F -->|Yes| H[_build_learning_curve
final_raw, final_ema, series_per_iter]
F -->|No| G[Learning.success_rate = None]
H --> I[Learning.success_rate: LearningCurve]
I --> J[TrainingBundle v1.1 JSON]
G --> J
B -->|has history| K[tracker.tail_mean
TrainingBundle.success_rate scalar]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[Training Adapter] --> B[get_success_tracker]
B -->|tracker not None| C[tracker.history]
B -->|tracker is None| D[success_rate_series = None]
C --> E[build_learning]
D --> E
E --> F{success_rates non-empty?}
F -->|Yes| H[_build_learning_curve
final_raw, final_ema, series_per_iter]
F -->|No| G[Learning.success_rate = None]
H --> I[Learning.success_rate: LearningCurve]
I --> J[TrainingBundle v1.1 JSON]
G --> J
B -->|has history| K[tracker.tail_mean
TrainingBundle.success_rate scalar]
Reviews (1): Last reviewed commit: "Remove implementation plan from schema P..." | Re-trigger Greptile |
| assert training_data["success_rate"] is not None | ||
| success_curve = training_data["learning"]["success_rate"] | ||
| assert success_curve is not None | ||
| assert success_curve["series_per_iter"] | ||
| assert success_curve["final_raw"] == pytest.approx(success_curve["series_per_iter"][-1]) |
There was a problem hiding this comment.
Unconditional success-rate assertions will fail for rl_games and rsl_rl
The expect_success_rate parameter was removed and the assertions that training_data["success_rate"] is not None, success_curve is not None, and success_curve["series_per_iter"] is truthy are now unconditional. The original parametrisation explicitly documented that rl_games and rsl_rl with Isaac-Cartpole-Direct do not produce a success rate (expect_success_rate=False for both). When neither framework emits a success metric on that task, tracker will be None in each adapter, so success_rate_series will be None, learning.success_rate will be None, and TrainingBundle.success_rate will be None — causing all three assertions to raise at runtime.
| @@ -0,0 +1,95 @@ | |||
| # Training Success-Rate Series Design | |||
There was a problem hiding this comment.
was this file intended?
Description
Adds success series in benchmark schema
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there