fix(worker): unquote CompilationTimes return annotation#673
Open
rebel-jinhwan wants to merge 1 commit into
Open
fix(worker): unquote CompilationTimes return annotation#673rebel-jinhwan wants to merge 1 commit into
rebel-jinhwan wants to merge 1 commit into
Conversation
Commit 8513cf7 quoted the return annotation of RBLNWorker.compile_or_warm_up_model, turning it into the string 'CompilationTimes'. CompilationTimes is imported unconditionally at module top level, so the quoting is unnecessary, and it makes inspect.signature(...).return_annotation return the string instead of the class. test_compile_or_warm_up_model_returns asserts the annotation is the CompilationTimes class (or empty), so it failed. Unquote it so the annotation resolves to the actual class. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
tests/torch_compile/unit/v1/worker/test_rbln_worker.py::TestInterfaceCompliance::test_compile_or_warm_up_model_returnsfails:The test checks that
RBLNWorker.compile_or_warm_up_model's return annotation is theCompilationTimesclass (orinspect.Parameter.empty):Cause
Commit
8513cf73("fix(worker): quote CompilationTimes return annotation") changed the annotation to a string literal:inspect.signature()does not resolve string annotations, soreturn_annotationbecame the string'CompilationTimes'rather than the class — failing theis CompilationTimescheck.Fix
CompilationTimesis imported unconditionally at module top level (from vllm.v1.worker.worker_base import CompilationTimes, WorkerBase), and the module has nofrom __future__ import annotations, so the quoting was unnecessary. Unquote it:Now
inspect.signature(...).return_annotationresolves to theCompilationTimesclass and the test passes.🤖 Generated with Claude Code