-
Notifications
You must be signed in to change notification settings - Fork 80
Add Quick search support for ensemble composing model parameter ranges #996
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
base: main
Are you sure you want to change the base?
Conversation
b5c3607 to
e821212
Compare
e821212 to
13abdd3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enables Quick search mode to optimize ensemble and BLS models where composing models have different resource requirements (e.g., CPU tokenizers with high instance counts alongside GPU models with limited instances). Previously, Quick search mode rejected any model with parameter ranges.
Key changes:
- Allow composing models to specify instance_group count ranges in Quick mode
- Add validation logic to distinguish between top-level and composing models
- Support powers-of-2 and contiguous sequence patterns for instance counts
- Preserve user-specified instance_group KIND (CPU/GPU) during coordinate mapping
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
tests/test_search_dimensions_factory.py |
New test suite validating SearchDimension creation from user-specified instance count lists |
tests/test_quick_run_config_generator.py |
Updated copyright header and test expectation for dynamic batching configuration |
tests/test_quick_coordinate_mapping.py |
New test suite for instance_group KIND extraction helper |
tests/test_ensemble_composing_model_integration.py |
Integration tests for ensemble models with mixed CPU/GPU composing models |
tests/test_config_composing_model_validation.py |
Validation tests ensuring composing models can use ranges while top-level models cannot |
model_analyzer/config/input/config_command.py |
Updated validation logic to permit parameter ranges for composing models |
model_analyzer/config/generate/run_config_generator_factory.py |
Added methods to create SearchDimensions from user-specified count lists |
model_analyzer/config/generate/quick_run_config_generator.py |
Enhanced coordinate mapping to preserve instance_group KIND and handle composing models |
docs/config_search.md |
Documentation for ensemble composing model parameter ranges feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7850677 to
275e9fb
Compare
209e349 to
db7fa66
Compare
db7fa66 to
c0b1994
Compare
Fix copyrights Fix tests Update tests Allow user to specify composing models instead of relying on auto-discovery Warn when there is a non-existent composing model. Update copyrights Update copyrights Fix model name YAML Correctly get kind Properly set CPU/GPU kind Address Copilot feedback Address Copilot feedback Fix regex for CI, add config in test
c0b1994 to
d450313
Compare
Summary
Enables Quick search mode to optimize ensemble and BLS models with composing models that have different resource requirements (e.g., CPU tokenizers with high instance counts alongside GPU models with limited instances).
Previously, Quick search mode rejected any model with parameter ranges, preventing users from optimizing composing models independently. This implementation allows composing models to specify instance_group count ranges while maintaining the restriction for top-level models.
Changes
Config Validation (
config_command.py)_is_composing_model()helper to identify BLS and CPU-only composing models_check_quick_search_model_config_parameters_combinations()to allow composing models to have parameter ranges_check_per_model_model_config_parameters()to permitmax_batch_sizeandinstance_groupranges for composing modelsSearchDimensions Construction (
run_config_generator_factory.py)_get_instance_count_list()to extract user-specified count lists from model configs_create_instance_dimension_from_list()to create constrained SearchDimensions[1, 2, 4, 8, 16, 32]→ EXPONENTIAL dimensions[1, 2, 3, 4, 5]→ LINEAR dimensions_is_powers_of_two()and_is_linear_sequence()validators_get_dimensions_for_model()to use user-specified lists when availableCoordinate Mapping (
quick_run_config_generator.py)_extract_instance_group_kind()to preserve user-specified KIND (CPU/GPU)_get_next_model_config_variant()to extract kind before removing searchable parametersDocumentation (
docs/config_search.md)Testing
Tests cover:
Example Configuration