-
Notifications
You must be signed in to change notification settings - Fork 169
Remove pruning supported model list in code #290
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
Signed-off-by: Keval Morabia <[email protected]>
WalkthroughThe change removes a helper for model-type validation, eliminates runtime checks against a supported-models set, and updates run_search to use self.model.config directly. It computes and sets kv_channels on the config when absent and applies SUPPORTED_HPARAMS from export_config to the model configuration. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as Caller
participant S as MCoreMinitronSearcher
participant M as Model
participant C as model.config
participant E as export_config
U->>S: run_search(model, export_config)
S->>M: access model
S->>C: model.config (retrieve)
note over S,C: Direct config access (changed)
S->>C: if kv_channels is None → set hidden_size//num_attention_heads
S->>C: apply SUPPORTED_HPARAMS from export_config
S-->>U: return search result
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (1)
⏰ 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)
✨ Finishing Touches
🧪 Generate unit tests
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. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #290 +/- ##
=======================================
Coverage 73.95% 73.95%
=======================================
Files 172 172
Lines 17405 17405
=======================================
Hits 12871 12871
Misses 4534 4534 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
What does this PR do?
Type of change: minor code improvement
Overview: Remove nemo imports for pruning supported model list as that can cause circular imports. Instead we can have checks on nemo/m-lm example before invoking pruning api.
Usage
N/A
Testing
N/A
Before your PR is "Ready for review"
Additional Information
Summary by CodeRabbit
Refactor
Chores