[CI] Bump mypy version (#34950)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
@@ -309,12 +309,16 @@ class AdapterLogitsProcessor(LogitsProcessor):
|
||||
|
||||
"""
|
||||
if req_lp := self.new_req_logits_processor(params):
|
||||
args = (
|
||||
[prompt_ids, output_ids]
|
||||
if (len(inspect.signature(req_lp).parameters) == 3)
|
||||
else [output_ids]
|
||||
)
|
||||
return partial(req_lp, *args) # type: ignore[misc]
|
||||
if len(inspect.signature(req_lp).parameters) == 3:
|
||||
if prompt_ids is None:
|
||||
raise ValueError(
|
||||
"Prompt token ids are required for this "
|
||||
"logits processor but were not provided."
|
||||
)
|
||||
args = [prompt_ids, output_ids]
|
||||
else:
|
||||
args = [output_ids]
|
||||
return partial(req_lp, *args)
|
||||
return None
|
||||
|
||||
def update_state(self, batch_update: BatchUpdate | None):
|
||||
|
||||
Reference in New Issue
Block a user