Fix teleop recording success term - #7579
Conversation
|
run-ci |
Greptile SummaryThe PR preserves the
Confidence Score: 5/5The PR appears safe to merge with no actionable correctness, security, or quality issues identified. The original success condition remains available for manual recording evaluation, while the inert registered replacement preserves manager references and prevents automatic success termination as intended. Important Files Changed
Reviews (1): Last reviewed commit: "Fix teleop recording success term" | Re-trigger Greptile |
There was a problem hiding this comment.
Isaac Lab Review Bot
The inert success termination preserves reward-manager references without restoring automatic success resets, but replace(func=_never_terminate, params={}) does not clear existing term parameters. Parameterized success terms can therefore pass unexpected keyword arguments to _never_terminate during stepping.
- Design and architecture: Keeping an always-false
successterm registered is appropriate because it preserves manager cross-references while retaining the original term for manual success evaluation. The replacement must fully remove or tolerate the original term parameters to make that design operational. - API: No public API or return-contract changes are introduced. The private
_never_terminatehelper has the expected boolean result shape and device placement, but its signature is incompatible with parameters retained from the original success configuration. - Implementation: The copied termination term retains existing dictionary entries because replacing a dict-valued field with an empty mapping does not clear it. Explicitly clear
paramson the copied term or allow_never_terminateto accept ignored keyword arguments. The startup test reaches manager initialization but does not step the environment, so it does not cover this failure path.
Minor fixes needed. Posted 1 actionable finding inline.
Automated review; human maintainers own approval decisions.
| # terms that reference "success" can still resolve it during initialization. | ||
| success_term = getattr(env_cfg.terminations, "success", None) | ||
| if success_term is not None: | ||
| env_cfg.terminations.success = success_term.replace(func=_never_terminate, params={}) |
There was a problem hiding this comment.
🟡 Warning · Implementation — replace(params={}) does not clear success term params
configclass.replace applies kwargs through update_class_from_dict, which recurses into dict-valued fields; an empty mapping updates nothing, so the inert term keeps the original params. Term preparation skips the signature check for single-argument callables, so this only surfaces at the first TerminationManager.compute() as _never_terminate() got an unexpected keyword argument ... for any task whose success term declares parameters. Assign params = {} on the copied term explicitly, or give _never_terminate a **kwargs tail.
|
run-ci |
4dfed88 to
154f937
Compare
# Description Restores the missing `torch` import in `test_ovrtx_clone_plan.py`. #7462 converted the existing clone-plan test inputs from Torch tensors to NumPy arrays and removed the then-unused import. #6308 subsequently added a new object-scale test using `torch.ones` and `torch.arange` without restoring the import, causing the repository-wide Ruff pre-commit check to fail with `F821 Undefined name torch`. This PR contains only the import repair and an `isaaclab_ov` `.skip` changelog fragment. It unblocks #7579 and other changes based on the current `develop` branch. ## Type of change - Bug fix (non-breaking test fix) ## Release backport - [ ] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` No release backport is required: `release/3.0.0` already imports `torch` in this test. ## Screenshots Not applicable. ## Testing - `uv run --no-project --with pre-commit python -m pre_commit run --all-files` - `uv run --no-project python tools/changelog/cli.py check --include-worktree` - `git diff --check upstream/develop...HEAD` ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the full pre-commit checks - [x] Documentation changes are not required because no public API changed - [x] My changes generate no new warnings - [x] The fix directly covers the Ruff `F821` failure - [x] I have added an `isaaclab_ov` changelog fragment - [x] My name already exists in `CONTRIBUTORS.md`
|
run-ci |
Description
Ports #7571 to
develop.record_demos.pyremoved thesuccesstermination before environment initialization. The Franka Reach reward configuration references that term throughis_terminated_term, so reward-manager initialization could not resolve thesuccesskey.This change:
successtermination registered while demonstration recording evaluates the original condition manually;isaaclab_teleopchangelog fragment.Release-branch counterpart: #7571.
The independent
developpre-commit baseline failure is split into #7582. This PR's repository-wide pre-commit job depends on that fix landing first.Type of change
Release backport
developAn explicit release PR already exists as #7571, so no additional automated backport is requested.
Screenshots
Not applicable.
Testing
uv run --no-project python tools/changelog/cli.py check --include-worktreepassed.git diff --check upstream/develop...HEADpassed.Checklist
isaaclab_teleopchangelog fragmentCONTRIBUTORS.md