-
Notifications
You must be signed in to change notification settings - Fork 677
feat: skip downloading model weights if using mocker (only tokenizer) #2213
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
Conversation
WalkthroughThe changes introduce an Changes
Sequence Diagram(s)sequenceDiagram
participant Test as test_router_e2e_with_mockers.py
participant Entrypoint as Python/Rust Entrypoint
participant Builder as LocalModelBuilder
participant Hub as Model Hub
Test->>Entrypoint: Start mocker engine (engine_type=Mocker)
Entrypoint->>Builder: .is_mocker(true)
Builder->>Hub: from_hf(..., ignore_weights=true)
Hub->>Hub: Filter out weight files if ignore_weights
Hub-->>Builder: Download only tokenizer (no weights)
Builder-->>Entrypoint: Build mocker engine
Entrypoint-->>Test: Engine ready for requests
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes found. Possibly related PRs
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (5)
🧰 Additional context used🧠 Learnings (2)📓 Common learningslib/bindings/python/rust/llm/entrypoint.rs (1)Learnt from: ryanolson ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🔇 Additional comments (12)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Overview:
closes #2088
Add
is_mockertoLocalModelBuilder. If true, then ignore downloading weight files (matching common patterns such as.bin,.safetensors,.h5, etc). Only applies to hf paths for now.Tests: