Fix circle reference which cause tpu_platform failed to import#1251
Merged
mrjunwan-lang merged 2 commits intomainfrom Dec 5, 2025
Merged
Fix circle reference which cause tpu_platform failed to import#1251mrjunwan-lang merged 2 commits intomainfrom
mrjunwan-lang merged 2 commits intomainfrom
Conversation
DescriptionStart with a short description of what the PR does and how this is a change from The rest of the description includes relevant details and context, examples:
If the change fixes a bug or a Github issue, please include a link, e.g.,: TestsPlease describe how you tested this change, and include any instructions and/or ChecklistBefore submitting this PR, please make sure:
|
py4
approved these changes
Dec 5, 2025
jrplatin
approved these changes
Dec 5, 2025
Closed
5 tasks
gpolovets1
pushed a commit
that referenced
this pull request
Dec 17, 2025
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.
Description
Fix circle reference which cause tpu_platform failed to import.
before the fix:
Traceback (most recent call last):
File "", line 1, in
File "/home/mrjunwan_google_com/tpu-inference/tpu_inference/platforms/init.py", line 2, in
from tpu_inference.platforms.tpu_platform import TpuPlatform
File "/home/mrjunwan_google_com/tpu-inference/tpu_inference/platforms/tpu_platform.py", line 11, in
from vllm.sampling_params import SamplingParams, SamplingType
File "/home/mrjunwan_google_com/vllm/vllm/sampling_params.py", line 15, in
from vllm.logits_process import LogitsProcessor
File "/home/mrjunwan_google_com/vllm/vllm/logits_process.py", line 8, in
from vllm.tokenizers import TokenizerLike
File "/home/mrjunwan_google_com/vllm/vllm/tokenizers/init.py", line 4, in
from .deepseekv32 import DeepseekV32Tokenizer
File "/home/mrjunwan_google_com/vllm/vllm/tokenizers/deepseekv32.py", line 9, in
from .hf import HfTokenizer, TokenizerLike
File "/home/mrjunwan_google_com/vllm/vllm/tokenizers/hf.py", line 10, in
from vllm.transformers_utils.config import get_sentence_transformer_tokenizer_config
File "/home/mrjunwan_google_com/vllm/vllm/transformers_utils/config.py", line 28, in
from vllm.config.utils import getattr_iter
File "/home/mrjunwan_google_com/vllm/vllm/config/init.py", line 17, in
from vllm.config.model import (
File "/home/mrjunwan_google_com/vllm/vllm/config/model.py", line 24, in
from vllm.transformers_utils.config import (
ImportError: cannot import name 'ConfigFormat' from partially initialized module 'vllm.transformers_utils.config' (most likely due to a circular import) (/home/mrjunwan_google_com/vllm/vllm/transformers_utils/config.py)
after the fix:
python examples/offline_inference.py
--model=Qwen/Qwen3-0.6B
--tensor_parallel_size=4
--data_parallel_size=1
--max_model_len=1024
run successfully