Skip to content

Log resolved task presets - #6908

Closed
AntoineRichard wants to merge 6 commits into
isaac-sim:developfrom
AntoineRichard:antoiner/resolved-preset-banner
Closed

Log resolved task presets#6908
AntoineRichard wants to merge 6 commits into
isaac-sim:developfrom
AntoineRichard:antoiner/resolved-preset-banner

Conversation

@AntoineRichard

Copy link
Copy Markdown
Collaborator

Description

Retains each active PresetCfg choice during the existing task-resolution walk and emits a compact INFO-level startup banner after Hydra resolution succeeds.

The banner prints one line per resolved preset, including physics, renderer, domain, and agent presets. Resolution metadata is stored privately on the environment config as __resolved_presets__ and remains excluded from Hydra and YAML serialization.

No new dependencies or additional configuration traversals are introduced.

Type of change

  • New feature (non-breaking change which adds functionality)

Screenshots

Not applicable; example output:

---------------- Resolved task presets ----------------
env.physics = newton_mjwarp -> NewtonCfg
-------------------------------------------------------

Testing

  • ./isaaclab.sh -p -m pytest source/isaaclab_tasks/test/core/test_hydra.py::test_resolve_task_config_logs_and_retains_resolved_newton_preset -q (1 passed, no Kit or simulator launch)
  • ./isaaclab.sh -f
  • Verified the regression test fails before the implementation because __resolved_presets__ is absent, then passes with the implementation.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh -f
  • No public documentation changes are required for this internal diagnostic behavior
  • My changes generate no new warnings
  • I have added one focused test that proves the feature works
  • I have added an isaaclab_tasks changelog fragment
  • My name already exists in CONTRIBUTORS.md

@AntoineRichard
AntoineRichard requested a review from a team August 5, 2026 09:43
@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Aug 5, 2026
Keep the banner strings next to their only consumer so they do not add module-level state for an internal logging detail.
@greptile-apps

greptile-apps Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds retained metadata and INFO-level startup logging for presets selected during task resolution.

  • Records each resolved environment and agent preset with its path, selected name, and replacement type.
  • Logs the collected selections after Hydra processing and keeps the metadata out of serialized configuration.
  • Adds a focused regression test and changelog fragment.

Confidence Score: 5/5

The PR appears safe to merge with no actionable correctness, compatibility, or security issues identified.

The retained metadata survives both task-resolution branches, remains excluded from config serialization, and is logged only after successful resolution.

Important Files Changed

Filename Overview
source/isaaclab_tasks/isaaclab_tasks/utils/hydra.py Records resolved presets, retains them as private environment-config metadata, and logs them after both direct and Hydra-backed resolution paths without affecting serialization.
source/isaaclab_tasks/test/core/test_hydra.py Adds a focused test covering preset retention, serialization exclusion, and exact INFO-level banner output.
source/isaaclab_tasks/changelog.d/resolved-preset-banner.rst Documents the new resolved-preset startup logging behavior.

Reviews (1): Last reviewed commit: "Log resolved task presets" | Re-trigger Greptile

@AntoineRichard AntoineRichard added this to the Isaac Lab 3.0 GA milestone Aug 5, 2026
@AntoineRichard AntoineRichard moved this to In review in Isaac Lab Aug 5, 2026

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Isaac Lab Review Bot

The preset-resolution accumulator and INFO banner are integrated into the existing traversal without an additional pass. One maintainability issue remains: the returned environment config is assigned an invented dunder attribute, contrary to the repository’s PEP 8 requirement.

  • Design and architecture: Recording at _pick_alternative centralizes collection for environment and agent presets and follows the existing accumulator pattern. The metadata storage mechanism should use a non-dunder private name with an explicit serialization-exclusion contract rather than relying on special-name handling.
  • API: Existing resolver signatures remain backward compatible, but register_task now mutates every returned environment config with the invented __resolved_presets__ attribute. Rename this metadata field to a single-underscore private name and explicitly ensure it remains excluded from serialization.
  • Implementation: The accumulator is threaded through both environment and agent resolution and the banner is emitted after successful resolution on both _run_hydra paths. The focused test verifies retention, serialization exclusion, and logging, but should be updated alongside the metadata-field correction.

Minor fixes needed. Posted 1 actionable finding inline.

Automated review; human maintainers own approval decisions.

else:
hydra_args.append(arg)

setattr(env_cfg, "__resolved_presets__", tuple(resolved_presets))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Suggestion · Api — Invented dunder attribute on returned env config

Every config returned by register_task/resolve_task_config now carries an invented __resolved_presets__ name; PEP 8 (a repository rule) says never to invent double-leading-and-trailing-underscore names. Its exclusion from to_dict()/ConfigStore also relies implicitly on class_to_dict skipping __-prefixed keys rather than an explicit rule. Prefer a single-underscore name with explicit serialization exclusion, or document the dependency at the assignment site.

@mmichelis

Copy link
Copy Markdown
Collaborator

The resolved-preset banner is currently invisible in normal entrypoints. I reproduced this with Isaac-Cartpole-Direct physics=newton_mjwarp: resolution retains (("env.sim.physics", "newton_mjwarp", "NewtonCfg"),), but no banner appears in the startup log. _log_resolved_presets() emits at INFO before launch_simulation configures INFO logging, so the records are discarded. The test masks this by calling caplog.set_level(logging.INFO). Please emit the banner after logging initialization (or initialize the appropriate handler earlier) and add an entrypoint-order regression test.

@StafaH

StafaH commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Closing in favor of #6933

@StafaH StafaH closed this Aug 6, 2026
@github-project-automation github-project-automation Bot moved this from In review to Done in Isaac Lab Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants