| [Feature] support auto model register
Co-authored-by: young256<liumingyang16@huawei.com>
# message auto-generated for no-merge-commit merge:
!2077 merge model-register into master
[Feature] support auto model register
Created-by: young256
Commit-by: young256
Merged-by: ascend-robot
Description: A decorator-based automatic model registration system has been implemented, enabling dynamic discovery and on-demand class loading without manual import statements or configuration files.
Core Functionality:
1. Lazy Initialization
Modules are imported only when the corresponding model is first requested, optimizing startup performance and resource usage.
2. Fault Containment
Import failures are isolated per module, ensuring that issues with one model don't disrupt the registration of others.
3. Comprehensive Diagnostics
Detailed error reporting includes available model inventories and specific failure causes for troubleshooting.
4. Extensibility by Design
The system adheres to the Open/Closed Principle:
Open for extension: Add new models by creating modules with decorated classes
Closed for modification: No changes to existing registry code required
Usage Workflow:
Create a new model module
Apply the registration decorator to model classes
The system automatically handles discovery and availability
See merge request: Ascend/MindSpeed-MM!2077 | 4 个月前 |