|
6 | 6 | from importlib.metadata import entry_points |
7 | 7 | from typing import Annotated |
8 | 8 |
|
9 | | -import mlperf_loadgen as lg |
10 | 9 | from loguru import logger |
11 | 10 | from pydantic import FilePath # noqa: TC002 |
12 | 11 | from pydantic_typer import Typer |
13 | 12 | from typer import Option |
14 | 13 |
|
| 14 | +from .benchmark import run_benchmark |
15 | 15 | from .deploy import LocalVllmDeployer |
16 | 16 | from .evaluation import run_evaluation |
17 | 17 | from .log import setup_loguru_for_benchmark |
18 | 18 | from .schema import Dataset, Endpoint, Settings, Verbosity, VllmEndpoint |
19 | | -from .task import ShopifyGlobalCatalogue |
20 | 19 |
|
21 | 20 | app = Typer() |
22 | 21 | benchmark_app = Typer() |
@@ -126,36 +125,6 @@ def benchmark_endpoint( |
126 | 125 | ) |
127 | 126 |
|
128 | 127 |
|
129 | | -def run_benchmark( |
130 | | - settings: Settings, |
131 | | - dataset: Dataset, |
132 | | - endpoint: Endpoint, |
133 | | - random_seed: int, |
134 | | -) -> None: |
135 | | - """Run the Qwen3-VL (Q3VL) benchmark.""" |
136 | | - logger.info("Running Qwen3-VL (Q3VL) benchmark with settings: {}", settings) |
137 | | - logger.info("Running Qwen3-VL (Q3VL) benchmark with dataset: {}", dataset) |
138 | | - logger.info( |
139 | | - "Running Qwen3-VL (Q3VL) benchmark with OpenAI API endpoint: {}", |
140 | | - endpoint, |
141 | | - ) |
142 | | - logger.info("Running Qwen3-VL (Q3VL) benchmark with random seed: {}", random_seed) |
143 | | - test_settings, log_settings = settings.to_lgtype() |
144 | | - task = ShopifyGlobalCatalogue( |
145 | | - dataset=dataset, |
146 | | - endpoint=endpoint, |
147 | | - settings=settings.test, |
148 | | - random_seed=random_seed, |
149 | | - ) |
150 | | - sut = task.construct_sut() |
151 | | - qsl = task.construct_qsl() |
152 | | - logger.info("Starting the Qwen3-VL (Q3VL) benchmark with LoadGen...") |
153 | | - lg.StartTestWithLogSettings(sut, qsl, test_settings, log_settings) |
154 | | - logger.info("The Qwen3-VL (Q3VL) benchmark with LoadGen completed.") |
155 | | - lg.DestroyQSL(qsl) |
156 | | - lg.DestroySUT(sut) |
157 | | - |
158 | | - |
159 | 128 | @benchmark_app.command(name="vllm") |
160 | 129 | def benchmark_vllm( |
161 | 130 | *, |
|
0 commit comments