Skip to content

Commit 748da5e

Browse files
committed
hide type error
Signed-off-by: dalthecow <[email protected]>
1 parent 591f803 commit 748da5e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/guidellm/presentation/data_models.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,14 @@ class BenchmarkDatum(BaseModel):
219219
@classmethod
220220
def get_strategy_display_str(cls, strategy: SchedulingStrategy):
221221
strategy_type = strategy if isinstance(strategy, str) else strategy.type_
222+
strategy_instance = (
223+
strategy if isinstance(strategy, SchedulingStrategy) else None
224+
)
222225

223226
if strategy_type == "concurrent":
224-
rate = f"@{strategy.streams}"
227+
rate = f"@{strategy.streams}" if strategy_instance else "@##" # type: ignore[attr-defined]
225228
elif strategy_type in ("constant", "poisson"):
226-
rate = f"@{strategy.rate:.2f}"
229+
rate = f"@{strategy.rate:.2f}" if strategy_instance else "@#.##" # type: ignore[attr-defined]
227230
else:
228231
rate = ""
229232
return f"{strategy_type}{rate}"

0 commit comments

Comments
 (0)