Skip to content

Conversation

markurtz
Copy link
Collaborator

@markurtz markurtz commented Aug 20, 2025

Summary

The main PR for the scheduler refactor project that all other PRs will be opened off of for review to limit PR sizes and consolidate into a central location for landing on main at once. Once all PRs are merged for the scope of the work, this will be merged into main.

The scheduler refactor is targeted at enhancing GuideLLM across a number of different targeted features and performance fixes. It rebuilds the core behind GuideLLM from the ground up with both performance and flexibility in mind. The specific features and fixes added with this refactor are the following:

  • Scheduler package: new interfaces and underlying objects...
  • Backend package: new interfaces and underlying objects...
  • Benchmark package: new interfaces and underlying objects...
  • Utils package: new utilities added to support the above efforts

Details

Contained PRs and pending work:

Test Plan

  • Unit tests -- Mark
  • E2E tests -- Alon
    • List out scenarios to run / functionalities (Rob G, Sam)
  • Perf testing -- Sam, Mark
  • User flow testing -- Rob G, Ben, Mark

Related Issues

  • TODO

  • "I certify that all code in this PR is my own, except as noted below."

Use of AI

  • Includes AI-assisted code completion
  • Includes code generated by an AI application
  • Includes AI-generated tests (NOTE: AI written tests should have a docstring that includes ## WRITTEN BY AI ##)

@markurtz markurtz self-assigned this Aug 20, 2025
@markurtz markurtz changed the title Starting point for scheduler refactor Scheduler refactor: base/main PR for final merge Aug 20, 2025
markurtz and others added 3 commits August 20, 2025 15:45
…singleton (#289)

## 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

- **Moved core
utilities** from `guidellm.objects.pydantic` to `guidellm.utils.pydantic_utils`
- **Added `AutoImporterMixin`** for dynamic module discovery within
packages
- **Added `RegistryMixin`** for object registration with optional
auto-discovery
- **Added singleton
mixins** (`SingletonMixin`, `ThreadSafeSingletonMixin`) for instance
management
- **Enhanced Pydantic
utilities** with `ReloadableBaseModel`, `StandardBaseDict`,
and `PydanticClassRegistryMixin` for polymorphic model serialization
- **Updated all imports** across the codebase to reference new module
locations
- **Added comprehensive test coverage** for all new utility modules
- **Removed obsolete** `guidellm.objects.pydantic` module and associated
tests

## Test Plan

- Run existing test suite to ensure no regressions from import changes
- Execute new utility module test suites covering smoke, sanity, and
regression scenarios

## Related Issues


---

- [x] "I certify that all code in this PR is my own, except as noted
below."

## Use of AI

- [x] Includes AI-assisted code completion
- [x] Includes code generated by an AI application
- [ ] Includes AI-generated tests (NOTE: AI written tests should have a
docstring that includes `## WRITTEN BY AI ##`)

---------

Signed-off-by: Mark Kurtz <[email protected]>
Co-authored-by: Copilot <[email protected]>
## Summary

This PR adds new utility modules for safe math function operations,
object info extraction, and reorganizes to consolidate into the utils
package.

## Details

- **Move statistics classes from `objects` to `utils`**:
Relocates `DistributionSummary`, `Percentiles`, `RunningStats`, `StatusDistributionSummary`,
and `TimeRunningStats` from `guidellm.objects.statistics` to `guidellm.utils.statistics`
- **Add new `functions.py` module**: Implements defensive programming
utilities
including `safe_getattr`, `safe_divide`, `safe_multiply`, `safe_add`, `safe_format_timestamp`,
and `all_defined` for handling None values and edge cases
- **Add new `mixins.py` module**: Provides `InfoMixin` class for
standardized metadata extraction and object introspection across
different class hierarchies
- **Enhance `text.py` module**: Adds comprehensive
documentation, `format_value_display` function for consistent metric
formatting, and improved text processing utilities
- **Update import statements**: Modifies all affected modules
(`benchmark`, `presentation`) to import statistics classes from their
new location in `utils`
- **Remove deprecated `objects` package**: Deletes the
now-empty `objects` directory and associated test files
- **Add comprehensive test coverage**: Includes new test suites
for `functions.py`, `mixins.py`, and `statistics.py`
- **Update `__init__.py` exports**: Adds new utility functions and
classes to the main utils package exports for easy access

## Test Plan

- Run the existing test suite to ensure no regressions from the
statistics class relocation
- Execute new test files:
    - test_functions.py - Tests for safe operation utilities
    - test_mixins.py - Tests for InfoMixin functionality
- test_statistics.py - Comprehensive tests for statistical analysis
utilities
    - test_text.py - Tests for enhanced text processing functions

## Related Issues


- Resolves #

---

- [X] "I certify that all code in this PR is my own, except as noted
below."

## Use of AI

- [X] Includes AI-assisted code completion
- [X] Includes code generated by an AI application
- [ ] Includes AI-generated tests (NOTE: AI written tests should have a
docstring that includes `## WRITTEN BY AI ##`)

---------

Signed-off-by: Mark Kurtz <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Samuel Monson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant