From d628a3c5cb333d3d3dd90c68bfde79ff5b012a27 Mon Sep 17 00:00:00 2001 From: Andreas Karatzas Date: Wed, 13 May 2026 05:50:47 -0500 Subject: [PATCH] [ROCm][CI] Skip ROCm batch invalid-input test pending torch fix (#41572) Signed-off-by: Andreas Karatzas --- vllm/sampling_params.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vllm/sampling_params.py b/vllm/sampling_params.py index 76834e9bd7..23cdc33341 100644 --- a/vllm/sampling_params.py +++ b/vllm/sampling_params.py @@ -535,6 +535,12 @@ class SamplingParams( "stop strings are only supported when detokenize is True. " "Set detokenize=True to use stop." ) + assert isinstance(self.bad_words, list) + if any(not bad_word for bad_word in self.bad_words): + raise ValueError( + f"bad_words cannot contain an empty string. " + f"Got bad_words={self.bad_words}" + ) def _verify_greedy_sampling(self) -> None: if self.n > 1: