Skip to content

[https://nvbugs/6464169][fix] Rename forward_forward_impl (signature unchanged); the base…#16728

Open
chenfeiz0326 wants to merge 1 commit into
NVIDIA:mainfrom
chenfeiz0326:repair-bot-bug6464169
Open

[https://nvbugs/6464169][fix] Rename forward_forward_impl (signature unchanged); the base…#16728
chenfeiz0326 wants to merge 1 commit into
NVIDIA:mainfrom
chenfeiz0326:repair-bot-bug6464169

Conversation

@chenfeiz0326

@chenfeiz0326 chenfeiz0326 commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Root cause: MTPEagleDynamicTreeWorker overrode SpecWorkerBase.forward, which SpecWorkerBase.init_subclass (nvbugs/6442074) forbids, raising TypeError at import and breaking every pytest collection (0 items, rc=4).
  • Fix: Rename forward_forward_impl (signature unchanged); the base SpecWorkerBase.forward wrapper calls self._forward_impl(*args, **kwargs) inside its metadata-cleanup try/finally, matching Eagle3OneModelWorker's pattern. Committed ONLY the Python file to avoid the prior scope-creep rejection.
  • Automated fix generated by repair-bot

Test plan

  • Verify fix on the same GPU type as the original failure
  • Check for regressions in related tests

Links

Dev Engineer Review

  • Renamed MTPEagleDynamicTreeWorker.forward to _forward_impl without changing its signature or implementation logic.
  • This avoids overriding the forbidden SpecWorkerBase.forward method while preserving the base wrapper’s metadata-cleanup behavior.
  • Scope is limited to the intended Python file; no configuration or test-list changes were made.
  • The change is consistent with the stated import-time TypeError fix and has low regression risk.

QA Engineer Review

No test changes.

…rward_impl

Signed-off-by: Chenfei Zhang <chenfeiz@nvidia.com>
@chenfeiz0326
chenfeiz0326 requested a review from a team as a code owner July 22, 2026 10:47
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: a1b4958f-02db-4dd8-ba04-1f3882d0d8e1

📥 Commits

Reviewing files that changed from the base of the PR and between 9cd6a49 and 903adca.

📒 Files selected for processing (1)
  • tensorrt_llm/_torch/speculative/mtp_dynamic_tree.py

Walkthrough

Renames MTPEagleDynamicTreeWorker.forward(...) to _forward_impl(...) while preserving its signature and forward-processing logic.

Changes

Dynamic tree worker entry point

Layer / File(s) Summary
Rename forward implementation
tensorrt_llm/_torch/speculative/mtp_dynamic_tree.py
The worker method is renamed from forward to _forward_impl with its existing parameters and logic unchanged.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested reviewers: cascade812

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is specific, uses the bug ID and fix type, and accurately summarizes the forward-to-_forward_impl rename.
Description check ✅ Passed The description clearly explains the bug, fix, test plan, and link, though it doesn't fully match the template headings or checklist.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@cascade812 cascade812 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this has been fixed by #16724

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.

2 participants