Skip to content

[Chore] clean commented debug code#1685

Merged
claude[bot] merged 1 commit into
InternLM:mainfrom
nil0x9:linty/clean-code-0417
Apr 21, 2026
Merged

[Chore] clean commented debug code#1685
claude[bot] merged 1 commit into
InternLM:mainfrom
nil0x9:linty/clean-code-0417

Conversation

@nil0x9
Copy link
Copy Markdown
Collaborator

@nil0x9 nil0x9 commented Apr 17, 2026

No description provided.

@nil0x9 nil0x9 force-pushed the linty/clean-code-0417 branch from 0e60ebe to 254824c Compare April 21, 2026 05:29
@nil0x9
Copy link
Copy Markdown
Collaborator Author

nil0x9 commented Apr 21, 2026

@claude review

@@ -692,15 +692,6 @@ def forward(
def backward(ctx, grad_output: torch.Tensor):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude: Nit: With the debug synchronize blocks removed, the name parameter (line 684) and ctx.name = name (line 688) in _BackwardSync.forward become dead code — ctx.name is no longer read in backward. Worth cleaning up in this same PR since the parameter only existed for the debug code being removed.

(Also, backward_sync itself appears unused in the codebase, but that's a separate concern.)

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Apr 21, 2026

Claude: ## Summary
Straightforward removal of commented-out debug code (print statements, breakpoints, torch.cuda.synchronize() guards) across 10 files. No functional changes.

Issues

Nit

  • [moe_decoder_layer.py:688] After removing the debug synchronize blocks, the name parameter and ctx.name = name in _BackwardSync.forward are dead code — ctx.name is no longer read in backward. Could be cleaned up in this PR.

Verdict

APPROVE

@nil0x9
Copy link
Copy Markdown
Collaborator Author

nil0x9 commented Apr 21, 2026

@claude rebase onto main and merge.

@nil0x9 nil0x9 force-pushed the linty/clean-code-0417 branch from 254824c to a31bd1f Compare April 21, 2026 14:50
Copy link
Copy Markdown
Contributor

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — clean removal of commented-out debug code. Rebased onto main.

@claude claude Bot merged commit 7a66e66 into InternLM:main Apr 21, 2026
6 of 7 checks passed
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Apr 21, 2026

Claude: Rebased onto main and merged as requested.

What was requested: Rebase PR onto main and merge.

Actions taken:

  1. Fetched the fork branch nil0x9/xtuner:linty/clean-code-0417
  2. Rebased the single commit ([Chore] clean commented debug code) onto the latest main (on top of a19ae05)
  3. Force-pushed the rebased branch to the fork → new commit a31bd1fa
  4. Approved the PR
  5. Waited for lint CI checks to pass, then merged with admin privileges

Merge commit: 7a66e66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant