-
Notifications
You must be signed in to change notification settings - Fork 72
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.pydantic
toguidellm.utils.pydantic_utils
and 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 <[email protected]> Signed-off-by: Mark Kurtz <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Mark Kurtz <[email protected]>
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.pydantic
toguidellm.utils.pydantic_utils
AutoImporterMixin
for dynamic module discovery within packagesRegistryMixin
for object registration with optional auto-discoverySingletonMixin
,ThreadSafeSingletonMixin
) for instance managementReloadableBaseModel
,StandardBaseDict
, andPydanticClassRegistryMixin
for polymorphic model serializationguidellm.objects.pydantic
module and associated testsTest Plan
Related Issues
Use of AI
## WRITTEN BY AI ##
)