Skip to content

Commit 4b1774f

Browse files
committed
Add info property to sat constraint
Signed-off-by: Samuel Monson <[email protected]>
1 parent 4b3bb9b commit 4b1774f

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

src/guidellm/scheduler/constraints/saturation.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,32 @@ def __init__(
334334
self.enabled = enabled
335335
self.reset()
336336

337+
@property
338+
def info(self) -> dict[str, Any]:
339+
"""
340+
Get current constraint configuration and state information.
341+
:return: Dictionary containing constraint type, configuration parameters,
342+
and current state metrics.
343+
"""
344+
345+
return {
346+
"type_": "over_saturation",
347+
"config": {
348+
"minimum_duration": self.minimum_duration,
349+
"minimum_ttft": self.minimum_ttft,
350+
"maximum_window_seconds": self.maximum_window_seconds,
351+
"maximum_window_ratio": self.maximum_window_ratio,
352+
"minimum_window_size": self.minimum_window_size,
353+
"moe_threshold": self.moe_threshold,
354+
"confidence": self.confidence,
355+
"enabled": self.enabled,
356+
},
357+
"duration": self.duration,
358+
"ttft_violations_counter": self.ttft_violations_counter,
359+
"total_finished_ever": self.total_finished_ever,
360+
"total_started_ever": self.total_started_ever,
361+
}
362+
337363
def reset(self) -> None:
338364
"""
339365
Reset all internal state to initial values.

0 commit comments

Comments
 (0)