[CI/Build] mypy: Resolve some errors from checking vllm/engine (#9267)
Signed-off-by: Russell Bryant <rbryant@redhat.com>
This commit is contained in:
@@ -57,7 +57,7 @@ class StopChecker:
|
||||
# Check if a stop token was encountered.
|
||||
# This assumes a single token produced per step.
|
||||
last_token_id = seq.get_last_token_id()
|
||||
if last_token_id in sampling_params.stop_token_ids:
|
||||
if last_token_id in (sampling_params.stop_token_ids or ()):
|
||||
if new_char_count and (
|
||||
not sampling_params.include_stop_str_in_output):
|
||||
# Remove last token
|
||||
@@ -92,7 +92,7 @@ class StopChecker:
|
||||
|
||||
Returns the stop string if matched or else None.
|
||||
"""
|
||||
if not new_char_count:
|
||||
if not new_char_count or not sampling_params.stop:
|
||||
return None
|
||||
|
||||
for stop_str in sampling_params.stop:
|
||||
|
||||
Reference in New Issue
Block a user