Skip to content

Conversation

@jianzs
Copy link
Contributor

@jianzs jianzs commented Apr 27, 2025

This change replamces explicit class definitions with string annotations for type hints, simplifying the import structure and avoiding circular dependencies. The modification maintains the original functionality while improving code readability and reducing potential import-related issues.

Signed-off-by: Jade Zheng <zheng.shoujian@outlook.com>
@github-actions
Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

@jianzs jianzs changed the title feat: use string annotation types for class definitions [MISC] Use string annotation types for class definitions Apr 27, 2025
Signed-off-by: Jade Zheng <zheng.shoujian@outlook.com>
Copy link
Member

@DarkLight1337 DarkLight1337 left a comment

Choose a reason for hiding this comment

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

Thanks for simplifying the code!

@DarkLight1337 DarkLight1337 enabled auto-merge (squash) April 27, 2025 06:58
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Apr 27, 2025

@classmethod
def check_and_update_config(cls, vllm_config: VllmConfig) -> None:
def check_and_update_config(cls, vllm_config: "VllmConfig") -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can make it with from __future__ import annotations, it will automatically convert all annotations to string.

Copy link
Member

Choose a reason for hiding this comment

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

I think either way is fine.

Copy link
Collaborator

Choose a reason for hiding this comment

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

wfm

@aarnphm aarnphm requested a review from DarkLight1337 April 27, 2025 07:13
@DarkLight1337 DarkLight1337 merged commit 30215ca into vllm-project:main Apr 27, 2025
59 checks passed
jikunshang pushed a commit to jikunshang/vllm that referenced this pull request Apr 29, 2025
…t#17244)

Signed-off-by: Jade Zheng <zheng.shoujian@outlook.com>
lk-chen pushed a commit to lk-chen/vllm that referenced this pull request Apr 29, 2025
…t#17244)

Signed-off-by: Jade Zheng <zheng.shoujian@outlook.com>
adobrzyn pushed a commit to HabanaAI/vllm-fork that referenced this pull request Apr 30, 2025
…t#17244)

Signed-off-by: Jade Zheng <zheng.shoujian@outlook.com>
Signed-off-by: Agata Dobrzyniewicz <adobrzyniewicz@habana.ai>
RichardoMrMu pushed a commit to RichardoMrMu/vllm that referenced this pull request May 12, 2025
…t#17244)

Signed-off-by: Jade Zheng <zheng.shoujian@outlook.com>
Signed-off-by: Mu Huai <tianbowen.tbw@antgroup.com>
zzzyq pushed a commit to zzzyq/vllm that referenced this pull request May 24, 2025
…t#17244)

Signed-off-by: Jade Zheng <zheng.shoujian@outlook.com>
Signed-off-by: Yuqi Zhang <yuqizhang@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants