Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion unsloth/import_fixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1526,7 +1526,9 @@ def disable_broken_vllm(error = None):
_install_vllm_blocker()
logger.warning(
"Unsloth: Detected broken vLLM binary extension; "
"disabling vLLM imports and continuing import."
"disabling vLLM imports and continuing import.\n"
"Please reinstall via `uv pip install unsloth vllm torchvision torchaudio "
"--torch-backend=auto`."
Comment on lines +1530 to +1531
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add --reinstall to vLLM recovery command

The new warning tells users to “reinstall” with uv pip install ..., but that command does not force a reinstall when the same versions are already present, so a broken vLLM wheel can remain unchanged and the recovery step can be ineffective. I checked uv pip install --help, which documents --reinstall as the flag that reinstalls already-installed packages; without it, this guidance can leave users stuck in the same broken state.

Useful? React with 👍 / 👎.

Comment on lines 1528 to +1531
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The new warning message is helpful, but it results in a very long, single-line log entry that can be difficult to read. For better readability and to make the command easier for users to copy, I recommend formatting it as a multi-line string using triple quotes.

Suggested change
"Unsloth: Detected broken vLLM binary extension; "
"disabling vLLM imports and continuing import."
"disabling vLLM imports and continuing import. "
"Please reinstall via `uv pip install unsloth vllm torchvision torchaudio "
"--torch-backend=auto`."
"""Unsloth: Detected broken vLLM binary extension; disabling vLLM imports and continuing import.
To fix this, please reinstall vLLM and its dependencies:
`uv pip install unsloth vllm torchvision torchaudio --torch-backend=auto`
"""

)
return True

Expand Down