Share one timestamped output directory across Experiment chunks#926
Share one timestamped output directory across Experiment chunks#926cvolkcvolk wants to merge 8 commits into
Conversation
🤖 Isaac Lab-Arena Review BotSummaryThis PR renames the single-Run execution primitive ( Design, Boundaries & ScopeOne question, not a blocker: the new Findings🔵 Improvement: Test CoverageGood. The new CLI option, the mutually-exclusive rejection, and both branches of VerdictShip it (one optional simplification question). |
Greptile SummaryThis PR introduces a deterministic output directory layout for managed Arena Experiment execution, allowing OSMO runners to write directly into their pre-allocated output directory instead of generating a timestamped subdirectory. It also renames
Confidence Score: 4/5Safe to merge; the new flag is opt-in, local invocations fall back to the existing timestamped path, and the rename is fully propagated across all call-sites and tests. The new flag and path resolution are straightforward and well-tested. Two minor concerns remain: shlex.join in experiment_runner_task.py shell-quotes {{output}} to '{{output}}' (inconsistent with policy_runner_task.py and not directly exercised by the test), and the --chunk_size/--experiment_output_directory conflict guard is a bare assert that disappears under -O. osmo/tasks/experiment_runner_task.py (quoting inconsistency with policy_runner_task.py) and isaaclab_arena/evaluation/experiment_runner.py (bare assert for the --chunk_size conflict guard). Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant CLI as experiment_runner CLI
participant Resolver as _resolve_experiment_output_directory
participant Runner as execute_experiment
participant Layout as experiment_output_layout
participant Run as execute_run
CLI->>Resolver: output_base_dir, experiment_output_directory
alt --experiment_output_directory provided (OSMO managed)
Resolver-->>CLI: Path(exact_experiment_output_directory)
else default local execution
Resolver->>Resolver: timestamped_run_dir(output_base_dir)
Resolver-->>CLI: Path(timestamped_dir)
end
CLI->>CLI: experiment_output_directory.mkdir(parents, exist_ok)
CLI->>Runner: "execute_experiment(cfg, output_dir=experiment_output_directory)"
loop for each run_config
Runner->>Layout: get_experiment_run_output_directory(output_dir, run_config.name)
Layout-->>Runner: output_dir / run_name
Runner->>Run: execute_run(run_config, run_output_directory)
Run-->>Runner: ArenaRunResult
end
Runner-->>CLI: list[ArenaRunResult]
%%{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"}}}%%
sequenceDiagram
participant CLI as experiment_runner CLI
participant Resolver as _resolve_experiment_output_directory
participant Runner as execute_experiment
participant Layout as experiment_output_layout
participant Run as execute_run
CLI->>Resolver: output_base_dir, experiment_output_directory
alt --experiment_output_directory provided (OSMO managed)
Resolver-->>CLI: Path(exact_experiment_output_directory)
else default local execution
Resolver->>Resolver: timestamped_run_dir(output_base_dir)
Resolver-->>CLI: Path(timestamped_dir)
end
CLI->>CLI: experiment_output_directory.mkdir(parents, exist_ok)
CLI->>Runner: "execute_experiment(cfg, output_dir=experiment_output_directory)"
loop for each run_config
Runner->>Layout: get_experiment_run_output_directory(output_dir, run_config.name)
Layout-->>Runner: output_dir / run_name
Runner->>Run: execute_run(run_config, run_output_directory)
Run-->>Runner: ArenaRunResult
end
Runner-->>CLI: list[ArenaRunResult]
Reviews (1): Last reviewed commit: "Define managed Experiment output layout" | Re-trigger Greptile |
| if args_cli.chunk_size is not None: | ||
| assert legacy_experiment_config is not None, "--chunk_size currently supports only legacy JSON Experiments" | ||
| assert ( | ||
| args_cli.experiment_output_directory is None | ||
| ), "--chunk_size cannot be combined with --experiment_output_directory" |
There was a problem hiding this comment.
Runtime assertion could be argparse-level validation
The guard against combining --chunk_size and --experiment_output_directory is a bare assert, which is silently disabled when Python runs with -O. The guard would be more robust as an explicit if + parser.error(...) call (or a check in parse_experiment_runner_args) so it fires in all execution modes and produces a user-readable error message consistent with the mutually-exclusive-group error produced by argparse for --output_base_dir/--experiment_output_directory.
4a5c3a2 to
2d0b6a7
Compare
c978f9f to
25a6dd6
Compare
2d0b6a7 to
d5922f1
Compare
Signed-off-by: Clemens Volk <cvolk@nvidia.com>
Share the Run output path contract between execution and managed consumers. Let OSMO write directly into its allocated output directory while preserving timestamped local output by default. Signed-off-by: Clemens Volk <cvolk@nvidia.com>
Keep the simple directory and Run-name composition at its call site instead of introducing an abstraction without behavior. Signed-off-by: Clemens Volk <cvolk@nvidia.com>
Treat a requested Experiment directory as the exact destination. When no directory is requested, keep the convenient timestamped local default under /eval/output. Signed-off-by: Clemens Volk <cvolk@nvidia.com>
Resolve one output directory before dispatching legacy chunks and pass that exact path to every child. This leaves one complete report while preserving a fresh SimulationApp for each chunk. Signed-off-by: Clemens Volk <cvolk@nvidia.com>
Signed-off-by: Clemens Volk <cvolk@nvidia.com>
Keep the output base directory as the public interface and reuse one generated Experiment directory across chunk workers. This preserves configurable timestamped output while leaving OSMO-specific discovery to the distributed workflow. Signed-off-by: Clemens Volk <cvolk@nvidia.com>
996b7da to
58e7827
Compare
Document the remaining typed Experiment chunking work and fail clearly instead of silently accepting an unsupported combination. Add a subprocess regression test for the command-line contract. Signed-off-by: Clemens Volk <cvolk@nvidia.com>
|
Closing for now. This PR addresses the separate legacy JSON |
Summary
Share timestamped output across chunks
Detailed description
execute_run(...)as the focused building block for executing oneArenaRunCfginside a caller-ownedSimulationApp.--output_base_dirbehavior: every invocation creates one timestamped Experiment directory below the configured base.SimulationAppper chunk while producing one directory and one combinedindex.htmlfor the whole Experiment.Output layout
Normal and chunked Experiments now use the same layout:
For example,
--output_base_dir ./other-directorywrites the Experiment below./other-directory/<timestamp>/. Chunk workers reuse that timestamped directory rather than creating one directory per chunk.