[https://nvbugs/6442074][fix] DSparkWorker: rename forward to _forward_impl#16577
[https://nvbugs/6442074][fix] DSparkWorker: rename forward to _forward_impl#16577brnguyen2 wants to merge 1 commit into
Conversation
…d_impl d973974 added __init_subclass__ to SpecWorkerBase requiring subclasses to implement _forward_impl instead of overriding forward directly, but did not update DSparkWorker. Rename the method to satisfy the contract. Signed-off-by: Brian Nguyen <brnguyen@nvidia.com>
d646217 to
25ca8b9
Compare
|
/mbot run |
📝 WalkthroughWalkthrough
ChangesDSpark worker entry-point refactor
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/bot run --disable-fail-fast |
|
PR_Github #60183 [ run ] triggered by Bot. Commit: |
|
PR_Github #60183 [ run ] completed with state
|
|
Heads-up: this PR's CI (pipeline 48556) failed on one more instance of the same problem — Could you add this hunk to this PR? (I can't push to your branch — maintainer-edit denied.) --- a/tests/unittest/_torch/speculative/test_rejection_buffers_guard.py
+++ b/tests/unittest/_torch/speculative/test_rejection_buffers_guard.py
@@ -201,6 +201,9 @@ class _Worker(SpecWorkerBase):
def max_draft_len(self) -> int:
return K
+ def _forward_impl(self, *args: object, **kwargs: object) -> None:
+ raise NotImplementedError
+
def _dispatch_meta(**over):
base = dict(Note both fixes need to ride in this PR: a separate PR with only the test fix can't go green either, because its CI merge still contains the unfixed dspark import error. With both hunks in, everything else on main is clean per the sweep. |
Review: LGTM — correct and clean bug fix, safe to mergeThis is a minimal (1 file, 1 line) fix for an integration/merge-ordering issue. Verified against the PR branch:
Risk: minimal — scoped to the DSpark speculative-decoding path, Recommendation: Just confirm CI passes (especially DSpark-related import / unit tests) before merging — the code itself is fine. |
|
Closed in favor of #16579. |
d973974 added
__init_subclass__toSpecWorkerBaserequiring subclasses to implement_forward_implinstead of overridingforwarddirectly, but did not updateDSparkWorker. This causes aTypeErrorat import time on any build that includes both that commit and the DSpark PR (#15808).Fix: rename
DSparkWorker.forward→DSparkWorker._forward_impl. Callers go throughSpecWorkerBase.forwardwhich wraps_forward_impl, so no call sites need updating.Summary by CodeRabbit