Commit 4c70b5b
authored
[GuideLLM Refactor] utility package updates, rewrites, and tests expansion needed for the other, refactored packages (#353)
## **Summary**
Introduces a comprehensive utilities infrastructure to support
distributed processing, inter-process communication, and statistical
analysis for the GuideLLM framework. The changes include new modules for
encoding/serialization, messaging systems, statistical computations, and
various utility mixins while removing deprecated functionality and
improving code organization.
## **Details**
- **Added messaging infrastructure** (`messaging.py`): Inter-process
communication abstractions supporting queue-based, pipe-based, and
manager-based messaging with configurable encoding and serialization
- **Added encoding utilities** (`encoding.py`): High-performance message
encoding/decoding with Pydantic model support, configurable
serialization strategies (dict/sequence), and binary encoding
(msgpack/msgspec)
- **Added statistical analysis** (`statistics.py`): Comprehensive
statistical computation tools including distribution summaries,
percentiles, running statistics, and specialized request timing analysis
- **Added registry system** (`registry.py`): Dynamic object registration
and discovery with auto-discovery capabilities for extensible plugin
architectures
- **Added Pydantic utilities** (`pydantic_utils.py`): Polymorphic model
serialization, registry integration, and standardized base model classes
- **Added console utilities** (`console.py`): Rich console integration
with status tracking, colored output, and progress indicators
- **Added synchronization utilities** (`synchronous.py`):
Async-compatible wrappers for threading/multiprocessing synchronization
primitives
- **Added singleton patterns** (`singleton.py`): Thread-safe and basic
singleton implementations for resource management
- **Added utility functions** (`functions.py`): Safe arithmetic
operations, timestamp formatting, and defensive programming utilities
- **Added mixin classes** (`mixins.py`): Reusable mixins for metadata
extraction and object introspection
- **Added auto-importer** (`auto_importer.py`): Automatic module
importing for dynamic class discovery
- **Enhanced text utilities**: Added `format_value_display()` function
for consistent metric formatting and improved documentation
- **Removed deprecated code**: Deleted `dict.py` module
with `recursive_key_update()` and `camelize_str()` function
from `text.py`
- **Updated imports**: Comprehensive reorganization
of `__init__.py` exports to reflect new utilities structure
## **Test Plan**
- Full unit tests added and passing
## **Related Issues**
This refactor supports the broader scheduler infrastructure improvements
and distributed processing capabilities.
---
- [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 ##`)File tree
30 files changed
+9498
-250
lines changed- src/guidellm
- benchmark
- objects
- utils
- tests/unit/utils
30 files changed
+9498
-250
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
| 256 | + | |
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
2 | 3 | | |
3 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
4 | 19 | | |
5 | 20 | | |
6 | 21 | | |
7 | 22 | | |
8 | 23 | | |
9 | 24 | | |
10 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
11 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
12 | 56 | | |
13 | 57 | | |
14 | | - | |
15 | 58 | | |
16 | 59 | | |
17 | | - | |
| 60 | + | |
| 61 | + | |
18 | 62 | | |
19 | 63 | | |
20 | 64 | | |
21 | 65 | | |
| 66 | + | |
22 | 67 | | |
23 | 68 | | |
24 | 69 | | |
| 70 | + | |
| 71 | + | |
25 | 72 | | |
| 73 | + | |
| 74 | + | |
26 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
27 | 79 | | |
| 80 | + | |
28 | 81 | | |
29 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
30 | 107 | | |
31 | 108 | | |
32 | 109 | | |
33 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
34 | 113 | | |
35 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
36 | 119 | | |
37 | 120 | | |
38 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
39 | 125 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
0 commit comments