Skip to content

Address evaluation runner review feedback - #884

Merged
cvolkcvolk merged 1 commit into
mainfrom
cvolk/refactor/evaluation-review-followups
Jul 9, 2026
Merged

cvolkcvolk merged 1 commit into
mainfrom
cvolk/refactor/evaluation-review-followups

Conversation

@cvolkcvolk

Copy link
Copy Markdown
Collaborator

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 Remove legacy evaluation job model #871 merged before these approved review changes could be pushed.

Separate Run table construction from printing, make camera detection a pure predicate, use Path for experiment output directories, and flush failure diagnostics.

Signed-off-by: Clemens Volk <[email protected]>
@arena-review-bot

Copy link
Copy Markdown
Contributor

🤖 Isaac Lab-Arena Review Bot

Summary

Clean, well-scoped follow-up to #871. It splits build_runs_info_table (returns the table, co-located with the typed ArenaRun* model) from printing (kept in eval_runner), turns camera detection into a pure predicate legacy_json_experiment_requires_cameras that no longer mutates the argparse namespace, narrows execute_experiment(output_dir=...) to Path with /-based joins, and adds flush=True to failure diagnostics so they survive a hard process exit. Each change is behavior-preserving and correctly verified; the test_execute_experiment_runs_in_declaration_order expectation was updated to the new Path type.

Findings

No blocking issues. The enable_cameras decision in main (record_camera_video or legacy_json_experiment_requires_cameras(...)) is equivalent to the old namespace-mutating helper, and the pure-predicate form is a clear improvement. Removing the hasattr(args_cli, "enable_cameras") guard is correct here — the attribute is always present on the parsed namespace.

Test Coverage

The refactored path is exercised by the updated test_run_execution.py, which now asserts the Path argument threading. The new legacy_json_experiment_requires_cameras predicate is untested; a tiny table-driven test (jobs with/without arena_env_args.enable_cameras) would lock in the behavior, but this is optional given how small and pure the function is.

Verdict

Ship it

@greptile-apps

greptile-apps Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR addresses late review feedback from #871, cleaning up three areas of the evaluation runner: table construction, camera detection, and output path handling.

  • build_runs_info_table is relocated from eval_runner.py into arena_run.py alongside the typed ArenaRunCfg/ArenaRunResult models, leaving only the print() call in the runner.
  • enable_cameras_if_required (which mutated argparse.Namespace) is replaced by a pure boolean predicate legacy_json_experiment_requires_cameras, and its result is folded into a single condition alongside the record_camera_video flag.
  • execute_experiment's output_dir parameter is narrowed from str | Path to Path, directory joining switches to the / operator, and flush=True is added to failure diagnostic prints so they are not lost when the process exits.

Confidence Score: 4/5

Safe to merge; all behavioral changes are logically equivalent to the code they replace.

The camera-enable refactor and the Path narrowing are straightforward rewrites with identical semantics. Relocating build_runs_info_table into arena_run.py is the one place worth a second look: the module is documented as a pure declarations file but now unconditionally imports PrettyTable and PolicyRegistry at the top level, widening the import footprint for all consumers of those data classes.

isaaclab_arena/evaluation/arena_run.py — the new top-level imports widen the dependency surface of a module that previously contained only data classes.

Important Files Changed

Filename Overview
isaaclab_arena/evaluation/arena_run.py Moved build_runs_info_table here from eval_runner.py; adds PrettyTable and PolicyRegistry as module-level imports to a module whose docstring advertises it as a pure declarations file.
isaaclab_arena/evaluation/eval_runner.py Replaces the mutating enable_cameras_if_required with a pure boolean helper, consolidates the camera-enable condition, and wraps the output directory in Path; logic is equivalent and cleaner.
isaaclab_arena/evaluation/run_execution.py Narrows output_dir to Path, replaces os.path.join with / operator, and adds flush=True to error diagnostics; all changes are correct and consistent.
isaaclab_arena/tests/test_run_execution.py Updated one test assertion to expect Path objects for output_dir; correctly reflects the narrowed type in execute_experiment.

Reviews (1): Last reviewed commit: "Address evaluation runner review feedbac..." | Re-trigger Greptile

Comment thread isaaclab_arena/evaluation/arena_run.py Resolved

@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.

Thanks!

@cvolkcvolk
cvolkcvolk merged commit f95b3af into main Jul 9, 2026
7 checks passed
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