Skip to content

Remove legacy evaluation job model - #871

Merged
cvolkcvolk merged 3 commits into
mainfrom
cvolk/refactor/remove-evaluation-job-model
Jul 9, 2026
Merged

cvolkcvolk merged 3 commits into
mainfrom
cvolk/refactor/remove-evaluation-job-model

Conversation

@cvolkcvolk

@cvolkcvolk cvolkcvolk commented Jul 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Use typed Runs for experiment orchestration. Replace the CLI-oriented Job and JobManager layer with the typed Run configuration and result model introduced in #867.

Detailed description

  • Treat each JSON document as an ordered Experiment of Runs and execute them directly through build_and_run.
  • Preserve the legacy JSON schema, CLI, chunking, camera preflight, reporting, and continue-on-error behavior.

@cvolkcvolk
cvolkcvolk marked this pull request as ready for review July 7, 2026 15:20
@greptile-apps

greptile-apps Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR replaces the CLI-oriented Job/JobManager layer with direct typed ArenaRunCfg/ArenaRunResult orchestration, removing job_manager.py entirely and introducing execute_experiment() and print_runs_info() in eval_runner.py.

  • execute_experiment() preserves continue-on-error, chunking, camera preflight, and metrics-logging behavior, now covered by three new lightweight pytest tests in test_eval_runner_orchestration.py.
  • A new assertion in legacy_eval_config.py explicitly rejects legacy JSON documents containing a \"status\" field, breaking the checkpoint/resume pattern the old JobManager supported.
  • test_job_manager.py is deleted and its coverage redistributed across test_legacy_eval_config.py and test_variations_hydra.py.

Confidence Score: 3/5

The orchestration refactor is well-structured but the status-field assertion is a real backward-compatibility break that could silently corrupt existing automation pipelines.

The core execute_experiment logic is a clean translation of the old loop and the new tests verify ordering, continue-on-error, and stop-on-failure without Isaac Sim. The breaking change in legacy_eval_config.py contradicts the stated goal of preserving the legacy JSON schema: any saved experiment file or script that writes a status field will now raise AssertionError instead of skipping or resuming completed runs.

isaaclab_arena/evaluation/legacy_eval_config.py — specifically the new status assertion and whether the compatibility guarantee in the PR description is accurate.

Important Files Changed

Filename Overview
isaaclab_arena/evaluation/eval_runner.py Core orchestration rewritten — Job/JobManager loop replaced with execute_experiment() and print_runs_info(); logic is clean and functionally equivalent except for status-field handling.
isaaclab_arena/evaluation/legacy_eval_config.py Adds assert "status" not in job_config — intentional but breaks any existing JSON files that contain a "status" field, contradicting the PR's claim to preserve the legacy JSON schema.
isaaclab_arena/evaluation/run_execution.py Extracts build_arena_builder_from_run_cfg into a public function by splitting _build_environment_from_cfg; refactoring is clean with no logic changes.
isaaclab_arena/evaluation/job_manager.py Entire file deleted as intended — Job, JobManager, and Status classes removed; their functionality migrated to ArenaRunCfg/ArenaRunResult and execute_experiment.
isaaclab_arena/tests/test_eval_runner_orchestration.py New test file with three lightweight pytest tests for execute_experiment covering ordering, continue-on-error, and stop-on-failure; no Isaac Sim dependency.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant CLI as eval_runner main()
    participant LEC as legacy_eval_config
    participant EE as execute_experiment()
    participant BAR as build_and_run()
    participant ML as MetricsLogger

    CLI->>LEC: run_cfgs_from_legacy_eval_config(experiment_config, device)
    LEC-->>CLI: list[ArenaRunCfg]
    CLI->>CLI: print_runs_info(run_cfgs, [])
    CLI->>EE: execute_experiment(run_cfgs, output_dir, ...)
    loop each ArenaRunCfg
        EE->>BAR: build_and_run(run_cfg, output_dir, video_cfg)
        alt success
            BAR-->>EE: ArenaRunResult(COMPLETED, metrics)
        else exception
            BAR-->>EE: raises Exception
            EE->>EE: append ArenaRunResult(FAILED)
            note over EE: continue or re-raise
        end
    end
    EE-->>CLI: list[ArenaRunResult]
    loop each result
        CLI->>ML: append_job_metrics(result.run_name, result.metrics)
    end
    CLI->>CLI: print_runs_info(run_cfgs, results)
    CLI->>ML: print_metrics()
Loading
%%{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 eval_runner main()
    participant LEC as legacy_eval_config
    participant EE as execute_experiment()
    participant BAR as build_and_run()
    participant ML as MetricsLogger

    CLI->>LEC: run_cfgs_from_legacy_eval_config(experiment_config, device)
    LEC-->>CLI: list[ArenaRunCfg]
    CLI->>CLI: print_runs_info(run_cfgs, [])
    CLI->>EE: execute_experiment(run_cfgs, output_dir, ...)
    loop each ArenaRunCfg
        EE->>BAR: build_and_run(run_cfg, output_dir, video_cfg)
        alt success
            BAR-->>EE: ArenaRunResult(COMPLETED, metrics)
        else exception
            BAR-->>EE: raises Exception
            EE->>EE: append ArenaRunResult(FAILED)
            note over EE: continue or re-raise
        end
    end
    EE-->>CLI: list[ArenaRunResult]
    loop each result
        CLI->>ML: append_job_metrics(result.run_name, result.metrics)
    end
    CLI->>CLI: print_runs_info(run_cfgs, results)
    CLI->>ML: print_metrics()
Loading

Reviews (1): Last reviewed commit: "Add variation inspection follow-up TODO" | Re-trigger Greptile

@arena-review-bot

Copy link
Copy Markdown
Contributor

🤖 Isaac Lab-Arena Review Bot

Summary

Clean, well-scoped refactor: deletes the CLI-oriented Job/JobManager layer and drives the JSON experiment format directly through typed ArenaRunCfg/ArenaRunResult and build_and_run. The legacy JSON schema, chunking, camera preflight, reporting, and continue-on-error behavior are all preserved, and error handling stays loud (traceback printed; re-raised unless --continue_on_error). No correctness, boundary, or wrapped-env issues found.

Design, Boundaries & Scope

One soft placement question (inline): execute_experiment is reusable run-list orchestration and could sit beside build_and_run in run_execution.py rather than in the main()/argparse entrypoint. Defensible either way — not a blocker.

One intentional behavior change worth noting for downstream users: a "status" field in a legacy job config is now rejected (assert) rather than used to skip already-completed jobs. This removes the old status-based resume path, but it fails loudly with a clear message and is covered by a test, so it is not a silent regression.

Findings

🔵 eval_runner.py:37 — consider moving execute_experiment next to build_and_run in run_execution.py (reusable orchestration, not CLI-specific).

Test Coverage

Good. The new test_eval_runner_orchestration.py tests order, continue-on-error, and stop-on-failure of execute_experiment in isolation by monkeypatching build_and_run — correctly a Phase-1 non-sim test, no inner/outer pattern needed. Coverage lost from the deleted test_job_manager.py was preserved by re-homing the two reusable-helper tests onto their underlying functions (legacy_environment_args_to_cli_args, overrides_from_dict). The sim test in test_eval_runner.py keeps the inner/outer pattern with deferred imports.

Verdict

Ship it (one optional 🔵 organization nit).

@alexmillane alexmillane left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice clean up!

Couple of nits.

@cvolkcvolk
cvolkcvolk merged commit 5623c96 into main Jul 9, 2026
6 checks passed
cvolkcvolk added a commit that referenced this pull request Jul 9, 2026
## Summary
Address late review feedback from #871

## Detailed description
- Move Run table construction alongside the typed Run model while
leaving printing to eval_runner.
- Make legacy camera detection a boolean helper that does not mutate the
argparse namespace.
- Use Path for experiment output directories and flush failure
diagnostics before a process exits.
- Follow up separately because #871 merged before these approved review
changes could be pushed.

Signed-off-by: Clemens Volk <[email protected]>
cvolkcvolk added a commit that referenced this pull request Jul 9, 2026
## Summary
Add typed YAML composition for Arena Experiments as the next step in
replacing argparse namespaces and legacy JSON evaluation jobs with
strongly typed configuration.

A follow-up connects this loader to `eval_runner.py` before the JSON
path is deprecated and removed.

  ## Detailed description
- Build on #871’s runtime model: an Arena Experiment is an ordered list
of typed Runs
- Transition experiment definitions to YAML because it fits the
configuration hierarchy directly. Ports
`getting_started_experiment.yaml`.
- Use Hydra as the composition layer, rather than merely as a YAML
parser. Hydra selects and constructs the concrete typed environment and
policy configs, rejects unsupported.
- Load each YAML Run into an ArenaRunCfg, composing its concrete
environment and policy configurations through an encapsulated Hydra
integration.
  - Keep eval_runner and legacy JSON handling unchanged in this PR

---------

Signed-off-by: Clemens Volk <[email protected]>
cvolkcvolk added a commit that referenced this pull request Oct 30, 2026
The sample output still showed the Job Name table that the Experiment
Runner stopped printing in #871. Show the current Run table, indent the
metrics as print_metrics does, and make the success rates in the text
match the metrics shown (0.1 for the jug, 0.9 for the ranch dressing
bottle).

Signed-off-by: Clemens Volk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants