Skip to content

Commit d899ec7

Browse files
committed
Make max_unfinished_queries optional with no limit by default
Signed-off-by: Jeff Wan <[email protected]>
1 parent cb89cd9 commit d899ec7

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

benchmarks/multi-round-qa/multi-round-qa.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ class WorkloadConfig:
4040
# Whether to include user id in request header
4141
enable_user_id: bool
4242

43-
# Max number of unfinished queries allowed
44-
max_unfinished_queries: int
43+
# Max number of unfinished queries allowed (None means no limit)
44+
max_unfinished_queries: Optional[int]
4545

4646

4747
@dataclass
@@ -423,7 +423,9 @@ def step(self, timestamp: float, executor: RequestExecutor):
423423
self.start_time = timestamp
424424

425425
pending_queries = len([s for s in self.sessions if s.has_unfinished_request])
426-
if pending_queries > self.workload_config.max_unfinished_queries:
426+
# Only check limit if max_unfinished_queries is set
427+
if (self.workload_config.max_unfinished_queries is not None and
428+
pending_queries > self.workload_config.max_unfinished_queries):
427429
logger.info(f"unfinished queries >{self.workload_config.max_unfinished_queries}, waiting")
428430
return
429431

@@ -636,8 +638,8 @@ def parse_arguments() -> WorkloadConfig:
636638
parser.add_argument(
637639
"--max-unfinished-queries",
638640
type=int,
639-
default=50,
640-
help="Maximum number of unfinished queries allowed (default: 50)",
641+
default=None,
642+
help="Maximum number of unfinished queries allowed (default: no limit)",
641643
)
642644
args = parser.parse_args()
643645
return args

0 commit comments

Comments
 (0)