Skip to content

Commit d9cbc70

Browse files
committed
Revert "Add support for single floats in rate"
This reverts commit e1afebe.
1 parent e1afebe commit d9cbc70

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/guidellm/benchmark/scenario.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ def get_builtin_scenarios() -> list[str]:
4040
return [p.stem for p in SCENARIO_DIR.glob("*.json")]
4141

4242

43-
def parse_float_list(value: str | float | list[float]) -> float | list[float]:
43+
def parse_float_list(value: str | float | list[float]) -> list[float]:
4444
"""
4545
Parse a comma separated string to a list of float
4646
or convert single float list of one or pass float
4747
list through.
4848
"""
4949
if isinstance(value, (int, float)):
50-
return float(value)
50+
return [value]
5151
elif isinstance(value, list):
5252
return value
5353

@@ -128,9 +128,9 @@ class Config:
128128
SkipValidation,
129129
]
130130
profile: StrategyType | ProfileType | Profile
131-
rate: Annotated[
132-
PositiveFloat | list[PositiveFloat] | None, BeforeValidator(parse_float_list)
133-
] = None
131+
rate: Annotated[list[PositiveFloat] | None, BeforeValidator(parse_float_list)] = (
132+
None
133+
)
134134
random_seed: int = 42
135135
# Backend configuration
136136
backend: BackendType | Backend = "openai_http"

0 commit comments

Comments
 (0)