From d8d22a820f2c01d2e782faa5a1521097b1b8a5a1 Mon Sep 17 00:00:00 2001 From: Samuel Monson Date: Tue, 18 Nov 2025 11:11:04 -0500 Subject: [PATCH 1/3] Track max-concurrency for throughput Signed-off-by: Samuel Monson --- src/guidellm/scheduler/strategies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guidellm/scheduler/strategies.py b/src/guidellm/scheduler/strategies.py index dfdd97f58..0522d300a 100644 --- a/src/guidellm/scheduler/strategies.py +++ b/src/guidellm/scheduler/strategies.py @@ -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: From d833b70e5130132e46794531ed0e87f945de0e9a Mon Sep 17 00:00:00 2001 From: Samuel Monson Date: Tue, 18 Nov 2025 12:07:13 -0500 Subject: [PATCH 2/3] Prevent non-sweep throughput without specifing rate Signed-off-by: Samuel Monson --- src/guidellm/benchmark/profiles.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/guidellm/benchmark/profiles.py b/src/guidellm/benchmark/profiles.py index 08fea0efc..848722809 100644 --- a/src/guidellm/benchmark/profiles.py +++ b/src/guidellm/benchmark/profiles.py @@ -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 From ad7308b1ae9fafd447f22aed999fffcfd2661059 Mon Sep 17 00:00:00 2001 From: Samuel Monson Date: Wed, 19 Nov 2025 15:33:06 -0500 Subject: [PATCH 3/3] Fix unit test Signed-off-by: Samuel Monson --- tests/unit/scheduler/test_strategies.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/unit/scheduler/test_strategies.py b/tests/unit/scheduler/test_strategies.py index 7f01fc89b..cc9d3b0a4 100644 --- a/tests/unit/scheduler/test_strategies.py +++ b/tests/unit/scheduler/test_strategies.py @@ -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]):