Add vLLM v0.18.1 source tree with KV transfer abort fix
third_party/vllm/ now tracked in git for direct patch management.
Based on vLLM v0.18.1 release with one patch applied:
vllm/v1/core/sched/scheduler.py:
Replace fatal assert with graceful skip when KV transfer callback
arrives for an already-aborted request during PD disaggregated serving.
Future vLLM modifications should be made directly in third_party/vllm/
and committed normally. The patches/ directory is kept as documentation
of what changed from upstream.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
22
third_party/vllm/tests/standalone_tests/lazy_imports.py
vendored
Normal file
22
third_party/vllm/tests/standalone_tests/lazy_imports.py
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
|
||||
# Description: Test the lazy import module
|
||||
# The utility function cannot be placed in `vllm.utils`
|
||||
# this needs to be a standalone script
|
||||
import sys
|
||||
|
||||
# List of modules that should not be imported too early.
|
||||
# Lazy import `torch._inductor.async_compile` to avoid creating
|
||||
# too many processes before we set the number of compiler threads.
|
||||
# Lazy import `cv2` to avoid bothering users who only use text models.
|
||||
# `cv2` can easily mess up the environment.
|
||||
module_names = ["torch._inductor.async_compile", "cv2"]
|
||||
|
||||
# set all modules in `module_names` to be None.
|
||||
# if we import any modules during `import vllm`, there would be a
|
||||
# hard error and nice stacktrace on the first import.
|
||||
for module_name in module_names:
|
||||
sys.modules[module_name] = None # type: ignore[assignment]
|
||||
|
||||
import vllm # noqa
|
||||
Reference in New Issue
Block a user