fix: preserve original model path for frontend config downloads#5102
Conversation
|
👋 Hi yurekami! Thank you for contributing to ai-dynamo/dynamo. Just a reminder: The 🚀 |
WalkthroughAdded Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Pre-merge checks✅ Passed checks (5 passed)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2025-09-02T16:46:54.015ZApplied to files:
🧬 Code graph analysis (1)lib/llm/src/model_card.rs (1)
🔇 Additional comments (5)
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. Comment |
|
Hi @yurekami, thanks for the contribution! Can you fix the merge conflict? No need to open a new PR for it, please fix it on this existing branch/PR. |
|
/ok to test 6606329 |
When --served-model-name is used to customize the display name, the frontend's download_config() method was using the display_name to download from HuggingFace, which fails because the custom name doesn't match any HuggingFace repository. This fix: 1. Adds source_model field to ModelDeploymentCard to preserve the original HuggingFace repository path 2. Updates set_name() to automatically preserve the original model path in source_model before overwriting display_name 3. Updates download_config() to use source_model when available, falling back to display_name for backward compatibility Fixes ai-dynamo#4748 Signed-off-by: yurekami <yurekami@users.noreply.github.com>
6606329 to
8ff8f78
Compare
|
/ok to test 8ff8f78 |
|
/ok to test 8ff8f78 |
|
Thanks @yurekami ! |
…ynamo#5102) Signed-off-by: yurekami <yurekami@users.noreply.github.com> Co-authored-by: yurekami <yurekami@users.noreply.github.com>
Overview
Fixes the frontend model download bug where using
--served-model-namecauses config download to fail because the customized name doesn't match any HuggingFace repository.Details
Root Cause
When
--served-model-nameis used,set_name()overwritesdisplay_namewith the custom name. Later,download_config()usesdisplay_nameto fetch from HuggingFace, but the custom name isn't a valid HuggingFace repository path.Solution
source_modelfield toModelDeploymentCard- preserves the original HuggingFace repository pathset_name()- automatically saves the originaldisplay_nametosource_modelbefore overwriting (addresses CodeRabbit's review feedback)download_config()- usessource_modelwhen available, falls back todisplay_namefor backward compatibilitysource_model: Noneinfrom_repo_checkout()- for local paths where no HF download is neededKey Improvement
The
set_name()fix ensures that whenever--served-model-nameis called, the original model path is automatically preserved. This is more robust than requiring callers to manually setsource_model.Where to start
lib/llm/src/model_card.rs- All changes are in this fileRelated Issues
Fixes #4748
Test Plan
--served-model-name custom-namesource_modelis not setNote: This PR is based on the fork's main branch. There may be merge conflicts with upstream due to recent changes. If so, please use "Update with merge" or squash-merge after resolving conflicts in
lib/llm/src/model_card.rs.Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.