[Scene] Deprecate InteractiveSceneCfg.clone_in_fabric - #5580
Conversation
The field is currently a no-op: no physics backend (isaaclab_physx, isaaclab_newton, isaaclab_ovphysx) reads cfg.clone_in_fabric. It is declared on InteractiveSceneCfg, passed through to TemplateCloneCfg, and never consumed. Setting it to True has no effect on cloning. Mark the field deprecated and emit a DeprecationWarning when a user sets it to True. The field is reset to False inside __post_init__ so re-runs (e.g. via configclass.replace) don't double-warn. The actual removal of the field — and cleanup of the ~14 env_cfg sites that currently set clone_in_fabric=True (also no-ops today) — is a follow-up after the deprecation period.
There was a problem hiding this comment.
Review: Deprecate InteractiveSceneCfg.clone_in_fabric
Clean deprecation implementation. The approach is sound:
What's good:
- Follows deprecation-first pattern correctly (warn now, remove later)
- Deprecation warning only fires on
True(the problematic value), not on defaultFalse - Resetting to
Falseafter warning prevents double-warn onconfigclass.replace— nice touch stacklevel=2is correct for warning from__post_init__- Changelog is clear and actionable
- Good audit trail in PR description (verified no backend reads the field)
One minor note:
- The version tag
.. deprecated:: 4.6.23in the docstring — is that the actual target version? Just flagging in case it's a placeholder.
LGTM ✅ — straightforward deprecation, no functional risks.
Greptile SummaryThis PR deprecates
Confidence Score: 4/5Safe to merge; the deprecation logic is correct and the field reset works as intended. The warning fires correctly and the field is properly reset. The only concern is that stacklevel=2 attributes the warning to a configclass-internal frame rather than the user's call site, which can cause Python's default DeprecationWarning filter to silently drop it in non-test runtimes. source/isaaclab/isaaclab/scene/interactive_scene_cfg.py — the stacklevel value in the warnings.warn call. Important Files Changed
Sequence DiagramsequenceDiagram
participant User as User Code
participant Init as dataclass __init__
participant Combined as _combined_function (configclass)
participant PostInit as __post_init__ (InteractiveSceneCfg)
participant CustomPost as _custom_post_init (configclass)
User->>Init: "InteractiveSceneCfg(clone_in_fabric=True)"
Init->>Combined: self.__post_init__()
Combined->>PostInit: f1(self)
PostInit-->>User: "warnings.warn(DeprecationWarning, stacklevel=2)"
PostInit->>PostInit: "self.clone_in_fabric = False"
Combined->>CustomPost: f2(self)
CustomPost->>CustomPost: deepcopy all fields
Combined-->>Init: return
Init-->>User: "instance (clone_in_fabric=False)"
Reviews (1): Last reviewed commit: "Deprecate InteractiveSceneCfg.clone_in_f..." | Re-trigger Greptile |
| warnings.warn( | ||
| "InteractiveSceneCfg.clone_in_fabric is deprecated and will be removed in a future release." | ||
| " The field is a no-op (no physics backend reads it); remove the kwarg.", | ||
| DeprecationWarning, | ||
| stacklevel=2, | ||
| ) |
There was a problem hiding this comment.
The
stacklevel=2 inside __post_init__ is off by two frames because @configclass wraps the method with _combined_function. The actual call chain when a user constructs the object is: user_code → dataclass __init__ → _combined (configclass.py:513) → user __post_init__ → warnings.warn. With stacklevel=2 the warning is attributed to configclass.py:513 (a library-internal frame), not the user's call site. Python's default DeprecationWarning filter only shows the warning when it appears to originate from user code or __main__, so this misdirection can silently swallow the warning in production (non-pytest) environments. The correct depth to reach the user's call site is stacklevel=4. Note: the existing ViewerCfg.__post_init__ in common.py has the same bug, so this is a latent pattern issue, but it's still worth fixing here to make the new deprecation reliably visible.
| warnings.warn( | |
| "InteractiveSceneCfg.clone_in_fabric is deprecated and will be removed in a future release." | |
| " The field is a no-op (no physics backend reads it); remove the kwarg.", | |
| DeprecationWarning, | |
| stacklevel=2, | |
| ) | |
| warnings.warn( | |
| "InteractiveSceneCfg.clone_in_fabric is deprecated and will be removed in a future release." | |
| " The field is a no-op (no physics backend reads it); remove the kwarg.", | |
| DeprecationWarning, | |
| stacklevel=4, | |
| ) |
|
Hi @hujc7 — thanks for putting this one up! 🙏 We're doing a cleanup pass over the Isaac Lab PR backlog, which had grown past 400 open pull requests, and we're closing out the ones that have gone quiet so the queue is reviewable again. Why this PR is being closed: Here is exactly what we found on this PR when we reviewed the backlog:
It was picked up by the sweep because it has been open for about 4 months. It was then put in the "close" bucket because the author has been silent for about 4 months — which is the signal we used to tell apart pull requests that are still being worked on from ones that have genuinely been set aside. We deliberately did not close pull requests that were approved and ready to land, or that were small and clearly still fixing a live bug — there were 27 of those, and we are merging them rather than closing them. No judgement on the change itself — this is purely backlog hygiene. If this is still wanted, please reopen it or re-submit against 🤖 This comment was drafted with AI assistance as part of a maintainer-led sweep of the Isaac Lab pull request backlog. A maintainer is behind this cleanup — but if this closure looks wrong, it may well be, so please push back and we'll take another look. |
Summary
Follow-up to #5437 addressing @ooctipus's comment: #5437 (comment)
InteractiveSceneCfg.clone_in_fabricis dead. The field is declared onInteractiveSceneCfg, passed through toTemplateCloneCfgat scene init, and never read by any physics backend — verified by grepping every*_physx,*_newton,*_ovphysx,*_ovpackage: zero hits. Settingclone_in_fabric=Truetoday has no effect on cloning.This PR deprecates the field per
AGENTS.md's breaking-change rule (deprecate first, remove in a later release).Behavior
clone_in_fabric=Truenow emits aDeprecationWarningfrom__post_init__and the field is reset toFalsebefore scene init proceeds (so re-runs viaconfigclass.replacedon't double-warn).clone_in_fabric=False(the default) is silent — matches the previous behavior.Out of scope (for later cleanup)
isaaclab_tasksenv-cfg sites that currently setclone_in_fabric=True(they're no-ops today; will trigger the new warning until the field is removed).TemplateCloneCfg.clone_in_fabric(internal-only; downstream ofInteractiveSceneCfg).Test plan
test_simulation_stage_in_memory.py/test_environments_with_stage_in_memory.pycontinue to pass.clone_in_fabric=Trueand confirm the DeprecationWarning fires.