Commit 20fd0d1
committed
refactor: split constraints into modular package structure
Refactor the single constraints.py file into a package structure where each
constraint type has its own file:
- protocols.py: Protocol definitions (Constraint, ConstraintInitializer, SerializableConstraintInitializer)
- factory.py: ConstraintsInitializerFactory for creating and managing constraints
- base.py: Base classes (PydanticConstraintInitializer, UnserializableConstraintInitializer)
- standard.py: Standard constraints (MaxNumber, MaxDuration, MaxErrors, MaxErrorRate, MaxGlobalErrorRate, RequestsExhausted)
- over_saturation.py: Over-saturation detection constraint implementation
This improves code organization and maintainability while preserving backward
compatibility through the package's __init__.py exports.
Signed-off-by: Alon Kellner <[email protected]>1 parent 2c76c4e commit 20fd0d1
File tree
7 files changed
+1606
-1467
lines changed- src/guidellm/scheduler
- constraints
7 files changed
+1606
-1467
lines changed
0 commit comments