Skip to content

Commit bc31dc5

Browse files
authored
Merge pull request #2 from vllm-project/fix-remove-no-need
fix: remove no needed todo and verify CI
2 parents 74f2ea0 + b1e7b2a commit bc31dc5

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

bench/bench_plot.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,16 @@ def plot_metric(metric: str, out_path: Path):
178178
# Determine modes to plot, optionally limiting to top-N by mean of metric
179179
all_modes = sorted({m for c in cats for m in cat_by_mode.get(c, {}).keys()})
180180
if len(all_modes) > 0:
181+
181182
def _mean(values):
182183
vals = [v for v in values if v is not None]
183184
return sum(vals) / len(vals) if vals else float("nan")
184185

185-
if args.max_modes is not None and args.max_modes > 0 and len(all_modes) > args.max_modes:
186+
if (
187+
args.max_modes is not None
188+
and args.max_modes > 0
189+
and len(all_modes) > args.max_modes
190+
):
186191
mode_means = []
187192
for mode in all_modes:
188193
vals = [cat_by_mode.get(c, {}).get(mode, {}).get(metric) for c in cats]
@@ -279,7 +284,9 @@ def _mean(values):
279284
ax.set_xlim(left_xlim, right_xlim)
280285
ylabel = metric.replace("_", " ")
281286
ax.set_ylabel(ylabel, fontsize=int(18 * args.font_scale))
282-
ax.set_title(f"Per-category {ylabel} per-mode values", fontsize=int(22 * args.font_scale))
287+
ax.set_title(
288+
f"Per-category {ylabel} per-mode values", fontsize=int(22 * args.font_scale)
289+
)
283290
ax.tick_params(axis="both", which="major", labelsize=int(14 * args.font_scale))
284291

285292
# Build a figure-level legend below the axes and reserve space to prevent overlap
@@ -290,7 +297,7 @@ def _mean(values):
290297
legend_rows = 2
291298
legend_ncol = max(1, (num_series + legend_rows - 1) // legend_rows)
292299
num_rows = legend_rows
293-
scale = (args.font_scale / 1.6)
300+
scale = args.font_scale / 1.6
294301
# Reserve generous space for long rotated tick labels and multi-row legend
295302
bottom_reserved = (0.28 * scale) + (0.12 * num_rows * scale)
296303
bottom_reserved = max(0.24, min(0.60, bottom_reserved))

bench/router_reason_bench.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,9 @@ def build_extra_body_for_model(
355355
# reasoning: True -> ON, False -> OFF, None -> base
356356

357357
lower = model_name.lower()
358-
if (("ds" in lower) or ("deepseek" in lower)) and ("v31" in lower or "v3.1" in lower or "v3" in lower):
358+
if (("ds" in lower) or ("deepseek" in lower)) and (
359+
"v31" in lower or "v3.1" in lower or "v3" in lower
360+
):
359361
if reasoning is True:
360362
return {"chat_template_kwargs": {"thinking": True}}
361363
if reasoning is None or reasoning is False:
@@ -535,7 +537,9 @@ def run_variants(q: Dict[str, Any]) -> List[Dict[str, Any]]:
535537

536538
with ThreadPoolExecutor(max_workers=concurrent_requests) as executor:
537539
futures = [executor.submit(run_variants, q) for q in questions_data]
538-
for future in tqdm(futures, total=len(futures), desc=f"Evaluating {model} (vLLM modes)"):
540+
for future in tqdm(
541+
futures, total=len(futures), desc=f"Evaluating {model} (vLLM modes)"
542+
):
539543
results.extend(future.result())
540544

541545
return pd.DataFrame(results)
@@ -584,7 +588,9 @@ def run_all_modes(q: Dict[str, Any]) -> List[Dict[str, Any]]:
584588

585589
with ThreadPoolExecutor(max_workers=concurrent_requests) as executor:
586590
futures = [executor.submit(run_all_modes, q) for q in questions]
587-
for future in tqdm(futures, total=len(futures), desc=f"Evaluating {model} (policies)"):
591+
for future in tqdm(
592+
futures, total=len(futures), desc=f"Evaluating {model} (policies)"
593+
):
588594
per_call_records.extend(future.result())
589595

590596
calls_df = pd.DataFrame(per_call_records)

src/semantic-router/pkg/extproc/request_handler.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,6 @@ func (r *OpenAIRouter) handleModelRouting(openAIRequest *openai.ChatCompletionNe
445445
selectedEndpoint = endpointAddress
446446
log.Printf("Selected endpoint address: %s for model: %s", selectedEndpoint, originalModel)
447447
} else {
448-
// TOOD(Xunzhuo): pick a random endpoint from the list of all available endpoints
449448
log.Printf("Warning: No endpoint found for model %s, using fallback", originalModel)
450449
}
451450
setHeaders := []*core.HeaderValueOption{}

0 commit comments

Comments
 (0)