Repository navigation
Rename modifiers and unify tensor processor APIs - #8693
mataylor-nvidia wants to merge 22 commits into
Conversation
|
Another option is to do aliasing, however this delays the name change that will eventually come |
|
run-ci |
|
run-ci |
[Medium impact] The PR appears safe to merge; no new actionable issues were found. SummaryRenames modifiers to tensor processors and gives tensor and structured-data processors one shared interface.
The earlier test-coverage thread was manually resolved without explanation. The replacement interface now has concrete coverage. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Observation configuration] --> B{Legacy modifiers set?}
B -->|Only legacy field| C[Warn and forward to tensor_processors]
B -->|Both fields| D[Raise ValueError]
B -->|No| E[Prepare processors]
C --> E
E --> F[Compute observation]
F --> G[Processors]
G --> H[Noise, clipping, scaling, delay, history]
Reviews (2) · Last reviewed commit: "Address tensor processor review feedback" · Reviewed by Greptile |
There was a problem hiding this comment.
Isaac Lab Review Bot
Needs attention: Compatibility and deprecation (1), Style consistency (2). Other reviewed categories look good.
- PR description: The body matches the diff, but replace the fork follow-up link, define PPISP, remove the stale “import-only” and Windows-temp details, and provide exact validation commands.
- Design and architecture: Architecture looks good.
- Scope and over-engineering: No over-engineering issues.
- API: API changes look good.
- Compatibility and deprecation: Breaking changes:
ObservationTermCfg.modifierslacks a functional alias, targeted warning, and transition coverage; retain it as a deprecated forwarding field before migrating consumers. - Implementation: Implementation looks good.
- Style consistency: Renamed identifiers remain in prose comments; use “tensor processors” outside code references.
- Test quality: Test quality looks good.
Significant concerns. Posted 3 inline findings.
Automated review; human maintainers own approval decisions.
|
|
||
|
|
||
| class DictTensorProcessor(ABC): | ||
| """Transform a dictionary of named tensors into a dictionary of named tensors. |
There was a problem hiding this comment.
This doesn't make any sense, transform into the same thing?
There was a problem hiding this comment.
updated to single TensorProcessor unified class
|
@greptile review |
|
run-ci |
| """Whether or not the observation manager should flatten history-based observation terms to a 2-D (N, D) tensor. | ||
| Defaults to True.""" | ||
|
|
||
| modifiers: list[TensorProcessorCfg] | None = None |
There was a problem hiding this comment.
The old cfg also need deprecation shim?
| configuration during construction; they are not forwarded to the constructed instance. | ||
| """ | ||
|
|
||
| inputs: list[str] = [] |
There was a problem hiding this comment.
the input and output key proably only make sense for dict tensor right?
Description
Rename
modifierstotensor_processorsand unify tensor and structured-data processing underTensorProcessor/TensorProcessorCfg.TensorProcessorDataaccepts Torch tensors,ProxyArray, and recursively nested lists, tuples, and string-keyed dictionaries. Each implementation defines its input and output structures; built-in filters retain their single-tensor behavior.Custom processors can accept input buffers in their constructor and call
super().__init__(cfg). Existing(cfg, data_dim, device)construction remains supported, andreset()andclose()default to no-ops. Configurations usefuncfor functions, classes, or lazy import strings;inputsandoutputsprovide optional named-key metadata. Managers resolve nested scene entities and manager terms in processor parameters.Observation terms remain tensor-valued and shape-preserving. Groups retain their concatenated-tensor or dictionary-of-tensors output. Processing order, noise, clipping, scaling, delay, and history retain their existing behavior.
Legacy
isaaclab.utils.modifiersandisaaclab_experimental.utils.modifiersimports remain supported with an import-timeDeprecationWarning, including old class names, submodule paths, wildcard imports, and serialized callable paths.ObservationTermCfg.modifiersalso remains supported: both observation managers emit a targetedFutureWarningand forward it totensor_processorsduring initialization. Constructor arguments and later assignments work; setting both fields raisesValueError, including empty lists. Migrate imports and configurations totensor_processorsbefore the deprecated names are removed in a future release.Camera attachment and Physically Plausible Image Signal Processing (PPISP) integration remain separate follow-up work. This PR establishes their shared processor interface and replaces the lower portion of #8571.
Validation
uv run python -m pytest source/isaaclab/test/managers/test_observation_manager.py -q— 42 passed, including deprecated constructor/assignment use, serialized configurations, Warp manager integration, caller-directed warnings, and conflicting-field rejection.uv run --no-sync python -m pytest source/isaaclab/test/utils/test_tensor_processors.py -q— 11 passed.uv run --no-sync python -m pytest source/isaaclab/test/managers/test_manager_base.py -q— 8 passed; PyTorch emitted its existingtorch.jit.scriptdeprecation warnings.modifiers, both managers ignored assigned legacy fields without warning, and conflicting fields were accepted.uv run --extra dev isaaclab --docs— clean full HTML build with warnings treated as errors.uv run isaaclab --format— repository formatting and lint checks.uv run python tools/changelog/cli.py check upstream/main --include-worktree— changelog validation.git diff --check— clean.Type of change
Release backport
develop