- 
                Notifications
    You must be signed in to change notification settings 
- Fork 92
Scheduler refactor [utils]: auto_importer, pydantic_utils, registry, singleton #289
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
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 refactors GuideLLM's utility infrastructure by introducing four new utility modules and consolidating Pydantic utilities from the objects package. The change establishes foundational capabilities for auto-discovery, registry patterns, singleton management, and enhanced Pydantic utilities while improving code organization.
- Added four new utility modules: AutoImporterMixin,RegistryMixin, singleton mixins (SingletonMixin,ThreadSafeSingletonMixin), and enhanced Pydantic utilities
- Consolidated Pydantic utilities: Moved classes from guidellm.objects.pydantictoguidellm.utils.pydantic_utilsand enhanced them with registry integration
- Updated import references: Modified all imports across the codebase to use the new module locations
Reviewed Changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description | 
|---|---|
| tests/unit/utils/test_*.py | Comprehensive test suites for all new utility modules | 
| tests/unit/objects/test_pydantic.py | Removed obsolete test file for moved Pydantic utilities | 
| src/guidellm/utils/*.py | New utility modules implementing singleton, registry, auto-importer, and enhanced Pydantic functionality | 
| src/guidellm/objects/pydantic.py | Removed original Pydantic utilities module | 
| src/guidellm/**/*.py | Updated import statements to reference new utility module locations | 
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Mark Kurtz <mark.j.kurtz@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Mark Kurtz <mark.j.kurtz@gmail.com>
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.
I reviewed the code in detail and skimmed the tests and didn't see anything, so this should be good once Samuel's concerns are addressed.
Summary
This PR introduces four new utility modules that provide foundational capabilities for auto-discovery, registry patterns, singleton management, and enhanced Pydantic utilities. It additionally consolidates the pydantic utility classes from guidellm.objects into the dedicated guidellm.utils module containing the new additions. This change improves code organization and establishes the foundation for upcoming scheduler refactoring work.
Details
guidellm.objects.pydantictoguidellm.utils.pydantic_utilsAutoImporterMixinfor dynamic module discovery within packagesRegistryMixinfor object registration with optional auto-discoverySingletonMixin,ThreadSafeSingletonMixin) for instance managementReloadableBaseModel,StandardBaseDict, andPydanticClassRegistryMixinfor polymorphic model serializationguidellm.objects.pydanticmodule and associated testsTest Plan
Related Issues
Use of AI
## WRITTEN BY AI ##)