Expose uploaded OSMO report URLs#932
Conversation
Signed-off-by: Clemens Volk <cvolk@nvidia.com>
🤖 Isaac Lab-Arena Review BotSummaryThis PR adds a typed No blocking issues found: URLs derive from a single Test CoverageGood. New unit tests cover VerdictShip it |
Greptile SummaryThis PR exposes the direct browser URL for OSMO-uploaded experiment reports by adding a typed
Confidence Score: 4/5Safe to merge — the change is additive and backwards-compatible; the only nit is a missing type annotation that does not affect runtime behaviour. All logic paths are covered by the new tests. The URL construction correctly percent-encodes the workflow ID, the dry-run path leaves workflow_id as None so no URL is printed for a dry run, and the default swift_path reproduces the old hardcoded Swift destination exactly. The one noted issue is that BaseTask.task_cfg is typed as TaskCfg | None while ExperimentOutputTask._get_outputs accesses .swift_path on it without narrowing, which would be flagged by a strict type checker even though it is always safe at runtime. osmo/tasks/experiment_output_task.py — the _get_outputs method accesses self.task_cfg.swift_path without narrowing the inherited TaskCfg | None annotation. Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant User
participant submit as submit_arena_experiment
participant workflow as Pi0ArenaExperimentWorkflow
participant outputTask as ExperimentOutputTask
participant osmo as OSMO CLI
User->>submit: ArenaExperimentSubmissionCfg(experiment_output.swift_path)
submit->>workflow: "experiment_output_task_cfg=ExperimentOutputTaskCfg(swift_path)"
workflow->>outputTask: "task_cfg=experiment_output_task_cfg"
outputTask-->>workflow: _get_outputs returns swift URL with workflow_id token
workflow-->>submit: rendered YAML
submit->>osmo: osmo workflow submit yaml
osmo-->>submit: "WorkflowSubmissionResult(returncode=0, workflow_id)"
submit->>submit: experiment_report_https_url(swift_path, workflow_id)
submit-->>User: Report HTTPS URL printed to stdout
%%{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 User
participant submit as submit_arena_experiment
participant workflow as Pi0ArenaExperimentWorkflow
participant outputTask as ExperimentOutputTask
participant osmo as OSMO CLI
User->>submit: ArenaExperimentSubmissionCfg(experiment_output.swift_path)
submit->>workflow: "experiment_output_task_cfg=ExperimentOutputTaskCfg(swift_path)"
workflow->>outputTask: "task_cfg=experiment_output_task_cfg"
outputTask-->>workflow: _get_outputs returns swift URL with workflow_id token
workflow-->>submit: rendered YAML
submit->>osmo: osmo workflow submit yaml
osmo-->>submit: "WorkflowSubmissionResult(returncode=0, workflow_id)"
submit->>submit: experiment_report_https_url(swift_path, workflow_id)
submit-->>User: Report HTTPS URL printed to stdout
Reviews (1): Last reviewed commit: "Expose uploaded OSMO report URLs" | Re-trigger Greptile |
| def _get_outputs(self) -> list[dict[str, Any]]: | ||
| """Publish the final Experiment directory, including all Runs and ``index.html``.""" | ||
| return [{"url": DATASET_SWIFT_URL}] | ||
| return [{"url": experiment_output_swift_url(self.task_cfg.swift_path)}] |
There was a problem hiding this comment.
self.task_cfg not narrowed to ExperimentOutputTaskCfg
BaseTask declares self.task_cfg as TaskCfg | None, so a static type-checker will flag the .swift_path access on line 104 as an unknown attribute and a potential None dereference. At runtime it's always safe because ExperimentOutputTask.__init__ requires a non-optional ExperimentOutputTaskCfg, but the declared type doesn't reflect that. Adding a typed attribute annotation (e.g. task_cfg: ExperimentOutputTaskCfg on the class body) would let type checkers verify this without changing behaviour.
Summary
Print direct URLs for uploaded OSMO reports
Detailed description
experiment_output.swift_pathoverride for the final Experiment output.index.htmlURL from the same path.