lazy load vllm.utils.serial_utils import tensor2base64 to avoid break. #30094
lazy load vllm.utils.serial_utils import tensor2base64 to avoid break. #30094QiliangCui wants to merge 1 commit intovllm-project:mainfrom
Conversation
…ing tpu. Signed-off-by: Qiliang Cui <derrhein@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request addresses a module loading issue by lazy-loading the tensor2base64 utility. The change correctly moves the import statement from the module level into the encode_base64 method where it is used. This is a standard and appropriate approach to resolve import-related problems, preventing an undesirable import chain from being triggered at application startup. The implementation is sound and effectively resolves the issue described in the pull request.
|
Sorry for breaking this |
|
thank you @DarkLight1337 ! No problem! We will add some test in vllm main branch so that will know if it impacts TPU. Jun from tpu team merged in fix in tpu branch vllm-project/tpu-inference#1251. So, I don't need to update this for now. |
Pull request was closed
Purpose
Fix the vllm on tpu loading issue.
After the PR #29970, vllm on tpu is blocked at loading by
Lazy loading
vllm.utils.serial_utils importcan address it.Test Plan
wait for ci/cd test.
manually load vllm tpu with
with the fix, it can loaded.
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.