Skip to content

Commit 9a0c582

Browse files
committed
throw error if user passes in rate in synchronous mode
1 parent eb03706 commit 9a0c582

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/guidellm/executor/profile_generator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ def next_profile(
6969
class FixedRateProfileGenerator(ProfileGenerator):
7070
def __init__(self, rate: List[float], rate_type: str, **kwargs):
7171
super().__init__(ProfileGenerationModes.FIXED)
72+
if rate_type == "synchronous" and rate.length > 0:
73+
raise ValueError("custom rates are not supported in synchronous mode")
7274
self._rates = rate
7375
self._rate_index = 0
7476
self._rate_type = rate_type

0 commit comments

Comments
 (0)