Fix termination manager reset comments#6006
Conversation
Greptile SummaryThis PR corrects two stale copy-paste comments in
Confidence Score: 5/5This is a comment-only change with no runtime impact; safe to merge. Both changed lines are documentation comments inside reset(). No logic, control flow, or data is altered — the two corrections simply align the docstring return description and the inline comment with the method's actual behavior. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant Caller
participant TerminationManager
Caller->>TerminationManager: reset(env_ids)
TerminationManager->>TerminationManager: compute episodic termination stats
TerminationManager->>TerminationManager: reset class-based termination terms
TerminationManager-->>Caller: "dict[str, Tensor] (Episode_Termination/* keys)"
Reviews (1): Last reviewed commit: "Fix termination manager reset comments" | Re-trigger Greptile |
There was a problem hiding this comment.
Review Summary
Verdict: LGTM ✅
This is a clean, targeted documentation fix. The two stale comments in TerminationManager.reset() incorrectly referenced "reward terms" — clearly a copy-paste artifact from RewardManager which shares a similar structure. Both corrections are accurate:
- Docstring (L137):
"Dictionary of episodic sum of individual reward terms"→"...termination terms"— matches the actual return value which reportsEpisode_Termination/keyed stats. - Inline comment (L148):
"reset all the reward terms"→"...termination terms"— correctly describes the loop resettingself._class_term_cfgs(termination term configurations).
Minor observation (non-blocking)
The PR description's docstring for the reset() method says "Returns the episodic counts of individual termination terms" while the return value description now says "episodic sum". Both are slightly imprecise — the actual value is float().mean(dim=0) (i.e., the mean across environments, not a sum or count). This pre-dates this PR and isn't something to block on, but could be worth a follow-up if the author is interested.
No functional impact, CI passes. Good catch! 👍
Description
Fixes two stale comments in
TerminationManager.reset()that referred to reward terms eventhough the method reports and resets termination terms. This keeps the docstring and inline comment consistent with the termination manager behavior.
Fixes # (issue)
Type of change
Checklist
IsaacLab/main/source/refs/contributing.html)
pre-commitchecks with./isaaclab.sh --formatconfig/ extension.tomlfileCONTRIBUTORS.mdor my name already exists thereNote: This is a comment-only documentation fix, so no runtime tests, changelog, or version
updates were added.