Repository navigation
Conversation
|
| ranges = torch.tensor([static_friction_range, dynamic_friction_range, restitution_range], device="cpu") | ||
| self.material_buckets = math_utils.sample_uniform(ranges[:, 0], ranges[:, 1], (num_buckets, 3), device="cpu") | ||
| if cfg.params.get("make_consistent", False): | ||
| if cfg.params["make_consistent"]: |
There was a problem hiding this comment.
Omitted flag breaks construction
The existing OVPhysX material tests construct this term with a SimpleNamespace config that omits make_consistent. Defaults are populated only for ManagerTermBaseCfg, so this lookup now raises KeyError instead of using the previous False fallback. Direct construction fails before material randomization can run.
| if cfg.params["make_consistent"]: | |
| if cfg.params.get("make_consistent", False): |
There was a problem hiding this comment.
Isaac Lab Review Bot
Reviewed the centralized callable-default resolution and distribution-aware randomization validation. The changed construction paths consistently materialize omitted defaults before class initialization and scene resolution, while preserving explicit values and isolating mutable defaults.
- Design and architecture: The shared
_populate_term_defaultshelper is integrated into stable and experimental manager construction paths, including deferred nested-term processing. Observation terms retain manager ownership of theoutparameter by rejecting configured values and removing the injected default before invocation. - API: Checked converted
cfg.params[...]consumers against their callable signatures and traced wrapper/backend parameter flow for material and gravity randomization. TheManagerTermBaseCfg.paramsbehavior is documented, mutable defaults are copied, explicitNoneis preserved, and affected packages include changelog fragments. - Implementation: The validation helper correctly distinguishes Gaussian
(mean, std)from uniform and log-uniform bounds, rejects non-finite values and invalid log-uniform bounds, and preserves per-field scale-sign policies across mass, inertia, actuator, joint, and tendon terms. Runtime mutations remain intentionally unvalidated, so callers changing parameters after construction retain responsibility for validity.
No blocking issues. No inline issue met the actionable-evidence threshold; the assessment above records the review feedback.
Automated review; human maintainers own approval decisions.
52b6a0e to
9d409eb
Compare
|
Rebased onto develop at c1a8bfa and force-pushed with a lease. Kept the upstream root-reset change from #8105: call-time ranges remain authoritative, and the removed constructor cache stays removed. Also migrated the existing changelog fragments to the current format. Validation: 119 tests passed across eight focused files covering manager defaults, event validation, mutable root-reset ranges, observations, rewards, terminations, and camera terms. Formatting and changelog checks passed. |
|
run-ci |
|
Fixed in b679225. Two material-randomization tests still used SimpleNamespace configs, bypassing the default initialization added by this PR and causing KeyError: make_consistent. They now use EventTermCfg and deliberately omit make_consistent to exercise its default. No production fallback or new tests. Both affected tests pass on CPU and CUDA (GPU 0); all 8 manager-default tests and formatting checks also pass. Disabling default initialization makes the corrected test fail, confirming it covers the contract. |
|
run-ci |
|
The OV suite now passes. I checked the two remaining failures:
|
…ibutions (#8127) # Description Manager term constructors currently repeat defaults already declared in their callable signatures. This can make construction disagree with execution: omitting an optional `operation` raises `KeyError` in several randomization terms, and Gaussian mass scaling `(0.5, 0.1)` is rejected as a reversed `(low, high)` range. Resolve omitted keyword defaults into the term's existing `params` mapping before construction and scene resolution. The stable and experimental managers share the implementation; mutable defaults are copied per term and explicit values, including `None`, are preserved. Direct class construction receives the same defaults after `super().__init__`. Backend and task constructors now consume those resolved parameters. Observation-manager `out` buffers remain manager-owned, and task guards for required values now check `None` where appropriate. Replace scale-only validation with distribution-aware construction checks for mass, inertia, actuator gains, joint parameters, and fixed tendons. Gaussian parameters are `(mean, std)`, uniform ranges remain ordered, log-uniform bounds must be positive, and non-finite parameters fail early. These checks cover `add`, `abs`, and `scale`; the existing scale-sign policy remains separate from distribution validity. Exception documentation uses one `ValueError` entry per constructor. No validation or signature inspection is added to simulation/reset loops. Runtime parameter changes continue through the same mapping; this change does not add revalidation of arbitrary mutations after construction. A positive Gaussian mean still does not guarantee positive samples. Fixes #3514. This is a broader alternative to #8123, with shared parameter-default resolution and repository-wide adoption. ## Validation - **183 passed across 15 test files**, each run in its own process: stable manager suites; event requirements; camera terms and camera/manager integration; experimental frontend and reward parity; task curricula; PhysX, Newton and OVPhysX event integration. - Confirmed the default-resolution regression fails when default population is disabled, and the Gaussian regression fails against the original mass constructor with the reported bound-order error. - `uv run isaaclab -f` and the changelog gate passed against the upstream PR base; GitHub pre-commit and changelog checks also passed. - Clean `uv run isaaclab --docs` build passed with warnings treated as errors; the final incremental build also passed. - Existing dependency deprecation warnings remain in test output. ## Type of change - Bug fix ## Release backport - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the pre-commit checks with `uv run isaaclab --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have validated the changed behavior with focused coverage and applied the test-audit criteria - [x] I have added a changelog fragment for every touched package - [x] My name already exists in `CONTRIBUTORS.md` --------- Co-authored-by: Octi Zhang <zhengyuz@nvidia.com> (cherry picked from commit e73d1f1)
|
Backported to |
# Description Restores the `CameraImageBase` fallback to a subclass's `default_data_type` when observation term parameters do not include `data_type`. `image_normals` intentionally reads the fixed `"normals"` output and does not expose a public `data_type` argument. The strict parameter lookup introduced in #8127 therefore raises `KeyError: 'data_type'` when the observation manager constructs the term. Falling back in the base class keeps the existing `image_normals` API unchanged while preserving explicit `data_type` configuration for the other image terms. Fixes NVBUG 6886551. No new dependencies. ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Release backport Not applicable: this pull request targets `release/3.0.0` directly. ## Screenshots Not applicable; this fixes an observation-term construction failure. ## Validation - Confirmed the regression test fails before the fix with `KeyError: 'data_type'`. - Camera-image unit tests: 25 passed. - `uv run isaaclab -f`: all code and style hooks passed. - The changelog validator passed against the `upstream/release/3.0.0` tip. ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `uv run isaaclab --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have validated the changed behavior with focused coverage and applied the [test-audit criteria](https://github.com/isaac-sim/IsaacLab/blob/develop/skills/developer/test-audit/SKILL.md) to the test change - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
Since isaac-sim#8127 the base class reads data_type from the term parameters, which the manager fills from each subclass's __call__ signature. The default_data_type attribute was no longer read and suggested a fallback that does not exist, which is how image_normals ended up without a data_type argument.
# Description Adds the missing `data_type: str = "normals"` parameter to `image_normals` and uses it to select the camera output. The new parameter is keyword-only so the existing positional order for `normalize`, `channel_first`, and `frame_stack` remains compatible. Manager terms resolve callable defaults into `cfg.params` before construction. Unlike the other per-modality image terms, `image_normals` did not declare its data type in the callable signature, so the strict `CameraImageBase` constructor raised `KeyError: 'data_type'`. This change fixes the signature rather than adding a fallback to the base class, keeping default resolution consistent with #8127. Fixes NVBUG 6886551 No new dependencies. ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Release backport - [ ] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` The release-branch compatibility fix is already open as #8373, so an automated duplicate backport is not requested. ## Screenshots Not applicable; this fixes observation-term construction. ## Validation - Confirmed the default-resolution regression test fails on the unmodified `develop` branch with `KeyError: 'data_type'`. - Confirmed the positional-compatibility regression test fails before the follow-up fix with `KeyError: False` and passes once `data_type` is keyword-only. - Camera-image unit tests: 26 passed. - `uv run isaaclab -f`: passed, including the changelog gate against `upstream/develop`. - `uv run --isolated --extra dev --extra ov -- make -C docs current-docs`: passed without warnings. ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `uv run isaaclab --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have validated the changed behavior with focused coverage and applied the [test-audit criteria](https://github.com/isaac-sim/IsaacLab/blob/develop/skills/developer/test-audit/SKILL.md) to the test change - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there --------- Co-authored-by: Antoine RICHARD <antoiner@nvidia.com>
Description
Manager term constructors currently repeat defaults already declared in their callable signatures. This can make construction disagree with execution: omitting an optional
operationraisesKeyErrorin several randomization terms, and Gaussian mass scaling(0.5, 0.1)is rejected as a reversed(low, high)range.Resolve omitted keyword defaults into the term's existing
paramsmapping before construction and scene resolution. The stable and experimental managers share the implementation; mutable defaults are copied per term and explicit values, includingNone, are preserved. Direct class construction receives the same defaults aftersuper().__init__. Backend and task constructors now consume those resolved parameters. Observation-manageroutbuffers remain manager-owned, and task guards for required values now checkNonewhere appropriate.Replace scale-only validation with distribution-aware construction checks for mass, inertia, actuator gains, joint parameters, and fixed tendons. Gaussian parameters are
(mean, std), uniform ranges remain ordered, log-uniform bounds must be positive, and non-finite parameters fail early. These checks coveradd,abs, andscale; the existing scale-sign policy remains separate from distribution validity. Exception documentation uses oneValueErrorentry per constructor.No validation or signature inspection is added to simulation/reset loops. Runtime parameter changes continue through the same mapping; this change does not add revalidation of arbitrary mutations after construction. A positive Gaussian mean still does not guarantee positive samples.
Fixes #3514. This is a broader alternative to #8123, with shared parameter-default resolution and repository-wide adoption.
Validation
uv run isaaclab -fand the changelog gate passed against the upstream PR base; GitHub pre-commit and changelog checks also passed.uv run isaaclab --docsbuild passed with warnings treated as errors; the final incremental build also passed.Type of change
Release backport
developChecklist
uv run isaaclab --formatCONTRIBUTORS.md