We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c07bd6b commit a464c50Copy full SHA for a464c50
vllm/sampling_params.py
@@ -270,9 +270,14 @@ def __post_init__(self) -> None:
270
self._all_stop_token_ids = set(self.stop_token_ids)
271
272
def _verify_args(self) -> None:
273
+ if not isinstance(self.n, int):
274
+ raise ValueError(f"n must be an int, but is of "
275
+ f"type {type(self.n)}")
276
if self.n < 1:
277
raise ValueError(f"n must be at least 1, got {self.n}.")
- assert isinstance(self.best_of, int)
278
+ if not isinstance(self.best_of, int):
279
+ raise ValueError(f'best_of must be an int, but is of '
280
+ f'type {type(self.best_of)}')
281
if self.best_of < self.n:
282
raise ValueError(f"best_of must be greater than or equal to n, "
283
f"got n={self.n} and best_of={self.best_of}.")
0 commit comments