Skip to content

Commit f2a7dc8

Browse files
committed
update
1 parent 2010c38 commit f2a7dc8

File tree

2 files changed

+318
-69
lines changed

2 files changed

+318
-69
lines changed

multimodal/vl2l/notebooks/shopify-global-catalogue.ipynb

Lines changed: 310 additions & 55 deletions
Large diffs are not rendered by default.

multimodal/vl2l/src/mlperf_inference_multimodal_vl2l/schema.py

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,7 @@ class TestSettings(BaseModelWithAttributeDescriptionsFromDocstrings):
197197
mode="before",
198198
)
199199
@classmethod
200-
def parse_timedelta(cls, value: timedelta | float |
201-
str) -> timedelta | str:
200+
def parse_timedelta(cls, value: timedelta | float | str) -> timedelta | str:
202201
"""Parse timedelta from seconds (int/float/str) or ISO 8601 format."""
203202
if isinstance(value, timedelta):
204203
return value
@@ -224,12 +223,9 @@ def to_lgtype(self) -> lg.TestSettings:
224223
settings.server_target_latency_ns = round(
225224
self.server_target_latency.total_seconds() * 1e9,
226225
)
227-
settings.ttft_latency = round(
228-
self.server_ttft_latency.total_seconds() * 1e9)
229-
settings.tpot_latency = round(
230-
self.server_tpot_latency.total_seconds() * 1e9)
231-
settings.min_duration_ms = round(
232-
self.min_duration.total_seconds() * 1000)
226+
settings.ttft_latency = round(self.server_ttft_latency.total_seconds() * 1e9)
227+
settings.tpot_latency = round(self.server_tpot_latency.total_seconds() * 1e9)
228+
settings.min_duration_ms = round(self.min_duration.total_seconds() * 1000)
233229
settings.min_query_count = self.min_query_count
234230
settings.performance_sample_count_override = (
235231
self.performance_sample_count_override
@@ -425,8 +421,7 @@ def __init__(self, flag: str) -> None:
425421
class BlacklistedVllmCliFlagError(ValueError):
426422
"""The exception raised when a blacklisted vllm CLI flag is encountered."""
427423

428-
BLACKLIST: ClassVar[list[str]] = [
429-
"--model", "--host", "--port", "--api-key"]
424+
BLACKLIST: ClassVar[list[str]] = ["--model", "--host", "--port", "--api-key"]
430425

431426
def __init__(self, flag: str) -> None:
432427
"""Initialize the exception."""
@@ -445,8 +440,8 @@ class ProductMetadata(BaseModelWithAttributeDescriptionsFromDocstrings):
445440
Each categorical level is separated by " > ".
446441
"""
447442

448-
brands: list[str]
449-
"""The brands of the product, e.g., ["giorgio armani", "hugo boss"]."""
443+
brand: str
444+
"""The brand of the product, e.g., "giorgio armani"."""
450445

451446
is_secondhand: bool
452447
"""True if the product is second-hand, False otherwise."""
@@ -479,6 +474,5 @@ def ensure_content_is_list(
479474
== "pydantic_core._pydantic_core"
480475
and message["content"].__class__.__name__ == "ValidatorIterator"
481476
):
482-
message["content"] = list(
483-
message["content"]) # type: ignore[arg-type]
477+
message["content"] = list(message["content"]) # type: ignore[arg-type]
484478
return messages

0 commit comments

Comments
 (0)