Skip to content

Add variation system base. Part 2/3, CLI configuration via hydra.#755

Merged
alexmillane merged 53 commits into
mainfrom
alex/feature/variation_hydra_config
Jun 11, 2026
Merged

Add variation system base. Part 2/3, CLI configuration via hydra.#755
alexmillane merged 53 commits into
mainfrom
alex/feature/variation_hydra_config

Conversation

@alexmillane

@alexmillane alexmillane commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add Hydra based configuration of variations from the CLI.

Detailed description

  • This means variations can be activated and controlled in all Isaac Lab Arena environments.

Not covered

  • Recording of variations will be covered in Part 3/3
  • Not integrated into eval_runner.py and correspondingly not integrated in the config file there. That will be introduced after Part 3/3.
  • Docs are added really only as a stub for developers; not a fully explanation.

Introduce the variation framework: a VariationBase with build-time and
run-time flavors, a SamplerBase abstraction with uniform and categorical
samplers, and two concrete variations -- HDR dome-light image selection
(build-time) and camera extrinsic decalibration (run-time).

Variations attach to any Asset (scene objects or embodiments) and are
collected by ArenaEnvBuilder, which applies build-time variations before
scene composition and folds run-time variations into the event manager
cfg. All variations default to disabled so existing envs are unchanged.

The variations package exposes its API lazily (PEP 562 __getattr__):
camera_decalibration pulls in torch and isaaclab.sensors, and importing
that pair before the SimulationApp launches corrupts USD's Python
bindings. Lazy exports keep importing the package -- or its lightweight
base/sampler submodules -- safe at module-load time (e.g. pytest
collection).

Signed-off-by: alex <amillane@nvidia.com>
- Rename camera_decalibration.py -> camera_decalibration_variation.py
- Drop package-level re-exports; import concrete classes from submodules
- Remove sampler/variation listener plumbing (deferred to a follow-up MR)
- Hoist a compulsory sampler_cfg field onto VariationBaseCfg and rename the
  per-variation sampler field to sampler_cfg
- Replace UniformSampler.event_shape with an abstract SamplerBase.shape_per_sample
- Drop the camera variation's unused mode field (all variations fire on reset)
- Move attribute docs onto each member and trim docstrings to one line

Signed-off-by: alex <amillane@nvidia.com>

@alexmillane alexmillane left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Partial self review.

Comment thread docs/pages/quickstart/first_experiments/exploring_variations.rst Outdated
Comment thread isaaclab_arena/cli/isaaclab_arena_cli.py Outdated
Comment thread isaaclab_arena/environments/arena_env_builder.py Outdated
Comment thread isaaclab_arena/environments/arena_env_builder.py Outdated
Comment thread isaaclab_arena/environments/arena_env_builder.py Outdated
Comment thread isaaclab_arena/variations/variations_catalog.py Outdated
Comment thread isaaclab_arena/variations/variations_catalog.py Outdated
Comment thread isaaclab_arena/variations/variations_catalog.py Outdated
Comment thread isaaclab_arena_environments/cli.py Outdated
Comment thread isaaclab_arena_environments/cli.py Outdated
Comment thread isaaclab_arena/variations/variations_hydra.py Outdated
@alexmillane alexmillane marked this pull request as ready for review June 5, 2026 11:30
@alexmillane alexmillane changed the title DRAFT: Add variation system base. Part 2/3, CLI configuration via hydra. Add variation system base. Part 2/3, CLI configuration via hydra. Jun 5, 2026
@xyao-nv

xyao-nv commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Clean, solid as always!
A bit off the topic, since you introduced hydra here and we have cli args, do you foresee we can converge user configuration to hydra system?

Comment thread isaaclab_arena/variations/variations_hydra.py
Comment thread isaaclab_arena/utils/hydra_overrides.py Outdated
Comment thread isaaclab_arena/variations/variations_hydra.py Outdated
Comment thread isaaclab_arena/variations/variations_hydra.py

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

Great!

Comment thread isaaclab_arena/variations/variations_hydra.py
@alexmillane alexmillane force-pushed the alex/feature/variation_hydra_config branch from 4c0744f to c37e9d1 Compare June 11, 2026 13:14
Comment thread isaaclab_arena/variations/variations_hydra.py
@alexmillane alexmillane merged commit 99e9ed5 into main Jun 11, 2026
6 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.

3 participants