Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Misc] Avoid calling unnecessary hf_list_repo_files for local model path #13348

Merged
merged 2 commits into from
Feb 19, 2025

Conversation

Isotr0py
Copy link
Collaborator

@Isotr0py Isotr0py commented Feb 16, 2025

  • There will be error logs due to hf_list_repo_files calling when model repo is local:
INFO 02-16 13:46:11 __init__.py:190] Automatically detected platform cuda.
ERROR 02-16 13:46:11 config.py:102] Error retrieving file list: Repo id must use alphanumeric chars or '-', '_', '.', '--' and '..' are forbidden, '-' and '.' cannot start or end the name, max length is 96: '../Florence-2-base'., retrying 1 of 2
ERROR 02-16 13:46:13 config.py:100] Error retrieving file list: Repo id must use alphanumeric chars or '-', '_', '.', '--' and '..' are forbidden, '-' and '.' cannot start or end the name, max length is 96: '../Florence-2-base'.
INFO 02-16 13:46:13 config.py:2407] Downcasting torch.float32 to torch.float16.
  • Avoid unnecessary hf_list_repo_files calling if the model repo is local so that we can prevent misleading error logs.

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.

🚀

Copy link
Member

@ywang96 ywang96 left a comment

Choose a reason for hiding this comment

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

@maxdebayser actually had the same PR #13292 but I feel like this PR is a bit cleaner?

@Isotr0py
Copy link
Collaborator Author

Isotr0py commented Feb 16, 2025

Oh, didn't notice that there has been a same PR, my bad! 😅

@maxdebayser
Copy link
Contributor

@Isotr0py , no problem, thanks for also proposing a fix for this problem!

@ywang96 , I agree that this PR also fixes the issue. I think it comes down to personal style preferences, so either way is fine by me. My personal view here is that the code in config.py has to abstract three different locations for the files (remotely, in local cache or local path) and deal with the fact that the information we have might be incomplete (in offline mode we only know that we don't have the file in cache, not that it doesn't exist). I like to do the abstraction part only in the higher-level functions like get_sentence_transformers_tokenizer_config() and leave lower level functions like list_repo_files specialized on a single task, in this case looking up remote hf repos. But again, either way is fine I think.

Copy link
Contributor

@maxdebayser maxdebayser left a comment

Choose a reason for hiding this comment

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

LGTM

@Isotr0py Isotr0py enabled auto-merge (squash) February 19, 2025 16:42
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Feb 19, 2025
@Isotr0py Isotr0py merged commit 550d97e into vllm-project:main Feb 19, 2025
55 of 58 checks passed
@Isotr0py Isotr0py deleted the local-lookup branch February 20, 2025 06:57
xjpang pushed a commit to xjpang/vllm that referenced this pull request Feb 20, 2025
kerthcet pushed a commit to kerthcet/vllm that referenced this pull request Feb 21, 2025
michaelrglass pushed a commit to michaelrglass/vllm that referenced this pull request Feb 21, 2025
Akshat-Tripathi pushed a commit to krai/vllm that referenced this pull request Mar 3, 2025
lk-chen pushed a commit to lk-chen/vllm that referenced this pull request Mar 5, 2025
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