Fix generated-shared-prefix bench_serving (#18769)

This commit is contained in:
Qiaolin Yu
2026-02-17 14:00:22 -08:00
committed by GitHub
parent 48fcd62d1f
commit 3c601db031

View File

@@ -1525,12 +1525,12 @@ def sample_custom_requests(
return filtered_dataset
def compute_random_lens(full_len: int, range_ratio: float, num: int) -> List[int]:
def compute_random_lens(full_len: int, range_ratio: float, num: int) -> np.ndarray:
return np.random.randint(
max(int(full_len * range_ratio), 1),
full_len + 1,
size=num,
).tolist()
)
def sample_random_requests(