Fix per file ruff ignores related to simplification (#26259)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
@@ -1310,10 +1310,7 @@ def _parse_chat_message_content_part(
|
||||
|
||||
modality = None
|
||||
if part_type == "image_pil":
|
||||
if content is not None:
|
||||
image_content = cast(Image.Image, content)
|
||||
else:
|
||||
image_content = None
|
||||
image_content = cast(Image.Image, content) if content is not None else None
|
||||
mm_parser.parse_image_pil(image_content, uuid)
|
||||
modality = "image"
|
||||
elif part_type in ("image_url", "input_image"):
|
||||
|
||||
@@ -1018,10 +1018,7 @@ class LLM:
|
||||
pooling_task = "encode"
|
||||
|
||||
if pooling_task is None:
|
||||
if "embed" in self.supported_tasks:
|
||||
pooling_task = "embed"
|
||||
else:
|
||||
pooling_task = "encode"
|
||||
pooling_task = "embed" if "embed" in self.supported_tasks else "encode"
|
||||
|
||||
logger.warning_once(
|
||||
"`LLM.encode` is currently using `pooling_task = %s`.\n"
|
||||
|
||||
Reference in New Issue
Block a user