Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/guidellm/benchmark/profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,10 @@ def resolve_args(
kwargs.pop("random_seed", None)
if rate is not None and len(rate) > 0:
kwargs["max_concurrency"] = rate[0]
else:
# Require explicit max_concurrency; in the future max_concurrency
# should be dynamic and rate can specify some tunable
raise ValueError("ThroughputProfile requires a rate parameter")
return kwargs

@property
Expand Down
2 changes: 1 addition & 1 deletion src/guidellm/scheduler/strategies.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def __str__(self) -> str:
"""
:return: String identifier for throughput strategy
"""
return "throughput"
return f"throughput@{self.max_concurrency or 'unlimited'}"

@property
def processes_limit(self) -> PositiveInt | None:
Expand Down
5 changes: 3 additions & 2 deletions tests/unit/scheduler/test_strategies.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,10 @@ def test_string_representation(
self, valid_instances: tuple[ThroughputStrategy, dict]
):
"""Test __str__ method for ThroughputStrategy."""
instance, _ = valid_instances
instance, constructor_args = valid_instances
max_concurrency = constructor_args.get("max_concurrency")
result = str(instance)
assert result == "throughput"
assert result == f"throughput@{max_concurrency or 'unlimited'}"

@pytest.mark.smoke
def test_marshalling(self, valid_instances: tuple[ThroughputStrategy, dict]):
Expand Down
Loading