Skip to content

Commit af8cb6d

Browse files
config changed
1 parent c6e926f commit af8cb6d

3 files changed

Lines changed: 59 additions & 63 deletions

File tree

‎app/catalog.py‎

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,28 @@ def _build_model_configs(catalog: dict) -> dict:
3232
"""
3333
Build the vLLM runtime config dict from catalog.json supported_models.
3434
35-
catalog.json uses gpu_count; the rest of the app uses tensor_parallel_size.
36-
pipeline_parallel_size and batch_size are not in catalog.json — defaults used.
35+
Only returns keys that ManifestBuilder.build_llm_benchmark_command() /
36+
worker.py actually read when starting a run — precision, input_tokens,
37+
output_tokens, batch_size, pipeline_parallel_size, and tensor_parallel_size
38+
(a duplicate of gpu_count) were previously returned here but never
39+
forwarded to the benchmark container, so they were dropped to avoid
40+
the UI collecting/sending config the backend silently ignores.
41+
42+
dataset_path has no catalog-level default — it's a path on the target
43+
GPU node's filesystem, supplied by the user per run — so it's always
44+
returned as "" here; the UI must require the user to fill it in before
45+
submitting, and /api/v1/benchmarks/start rejects a blank value.
3746
"""
3847
configs = {}
3948
for model in catalog.get("supported_models", []):
4049
model_id = model["model_id"].lower()
4150
dc = model.get("default_config", {})
4251
configs[model_id] = {
43-
"precision": dc.get("precision", "fp16"),
52+
"gpu_count": dc.get("gpu_count", 1),
4453
"concurrency": dc.get("concurrency", 4),
45-
"input_tokens": dc.get("input_tokens", 512),
46-
"output_tokens": dc.get("output_tokens", 256),
4754
"max_model_len": dc.get("max_model_len", 4096),
48-
"tensor_parallel_size": dc.get("gpu_count", 1),
49-
"pipeline_parallel_size": 1,
50-
"batch_size": 32,
55+
"enable_optimizations": dc.get("enable_optimizations", False),
56+
"dataset_path": "",
5157
}
5258
return configs
5359

@@ -78,13 +84,9 @@ def _build_model_info(catalog: dict) -> dict:
7884
_MODEL_INFO: dict = _build_model_info(_catalog)
7985

8086
_DEFAULT_CONFIG: dict = {
81-
"precision": "fp16",
87+
"gpu_count": 1,
8288
"concurrency": 4,
83-
"input_tokens": 512,
84-
"output_tokens": 256,
8589
"max_model_len": 4096,
86-
"tensor_parallel_size": 1,
87-
"pipeline_parallel_size": 1,
88-
"batch_size": 32,
90+
"enable_optimizations": False,
8991
"dataset_path": "",
9092
}

‎app/routers/benchmarks.py‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import uuid
22
from datetime import datetime
33

4-
from fastapi import APIRouter, Depends, HTTPException, Request
4+
from fastapi import APIRouter, Depends, HTTPException, Request, status
55
from fastapi.responses import StreamingResponse
66
from sqlalchemy.ext.asyncio import AsyncSession
77
from sqlalchemy import select
@@ -28,6 +28,19 @@ async def start_benchmark(
2828
2. Dispatches a Celery task to begin the orchestration chain.
2929
3. Returns the task_id immediately so the UI can start polling.
3030
"""
31+
dataset_path = (request.config.get("dataset_path") or "").strip()
32+
if not dataset_path:
33+
# Previously this was only caught deep inside worker.py, after the
34+
# Workload/Node rows were already committed and the Celery task
35+
# dispatched — the run would sit as "running" for two steps before
36+
# failing. Reject it here instead, at submit time.
37+
raise HTTPException(
38+
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
39+
detail="config.dataset_path is required: an absolute path to a "
40+
"ShareGPT-format JSON file that already exists on the "
41+
"target GPU node.",
42+
)
43+
3144
date_str = datetime.utcnow().strftime("%Y%m%d")
3245
short_uuid = str(uuid.uuid4())[:6]
3346
task_id = "wl-%s-%s" % (date_str, short_uuid)

‎demo-ui/index.html‎

Lines changed: 29 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -921,51 +921,32 @@ <h3 style="margin:0;">vLLM Configuration</h3>
921921

922922
<div class="form-grid" style="grid-template-columns:1fr 1fr 1fr;">
923923

924-
<div class="form-field">
925-
<label for="cfg-precision">Precision</label>
926-
<select id="cfg-precision" class="form-select">
927-
<option value="fp32">FP32</option>
928-
<option value="fp16">FP16</option>
929-
<option value="bf16">BF16</option>
930-
<option value="fp8">FP8</option>
931-
</select>
932-
</div>
933-
934924
<div class="form-field">
935925
<label for="cfg-concurrency">Concurrency</label>
936926
<input id="cfg-concurrency" type="number" value="4" min="1" class="form-input">
937927
</div>
938928

939-
<div class="form-field">
940-
<label for="cfg-batch">Batch Size</label>
941-
<input id="cfg-batch" type="number" value="32" min="1" class="form-input">
942-
</div>
943-
944-
<div class="form-field">
945-
<label for="cfg-isl">ISL (Input Tokens)</label>
946-
<input id="cfg-isl" type="number" value="512" min="1" class="form-input">
947-
</div>
948-
949-
<div class="form-field">
950-
<label for="cfg-osl">OSL (Output Tokens)</label>
951-
<input id="cfg-osl" type="number" value="128" min="1" class="form-input">
952-
</div>
953-
954929
<div class="form-field">
955930
<label for="cfg-maxlen">Max Model Len</label>
956931
<input id="cfg-maxlen" type="number" value="2048" min="256" class="form-input">
957932
</div>
958933

959934
<div class="form-field">
960-
<label for="cfg-tp">Tensor Parallel (TP)</label>
935+
<label for="cfg-tp">GPU Count / Tensor Parallel (TP)</label>
961936
<input id="cfg-tp" type="number" value="1" min="1" class="form-input">
962937
</div>
963938

939+
</div>
940+
941+
<div class="form-grid" style="grid-template-columns:1fr;margin-top:8px;">
964942
<div class="form-field">
965-
<label for="cfg-pp">Pipeline Parallel (PP)</label>
966-
<input id="cfg-pp" type="number" value="1" min="1" class="form-input">
943+
<label for="cfg-dataset-path">Dataset Path <span style="color:var(--accent-red,#e5484d);">*</span></label>
944+
<input id="cfg-dataset-path" type="text" class="form-input"
945+
placeholder="Absolute path to a ShareGPT-format JSON file on the GPU node, e.g. /home/drut/datasets/sharegpt.json">
946+
<span style="font-size:11px;color:var(--text-secondary);">
947+
Required. Must already exist on the target node — nothing is downloaded or bundled by the server.
948+
</span>
967949
</div>
968-
969950
</div>
970951

971952
<button onclick="startBenchmark()" class="btn-primary" style="margin-top:20px;">Start Benchmark</button>
@@ -1368,16 +1349,13 @@ <h3>Launch Jupyter Lab</h3>
13681349
const r = await fetch(API + '/api/v1/models/config?model=' + encodeURIComponent(model));
13691350
const cfg = await r.json();
13701351
// Populate step 2 fields
1371-
const prec = document.getElementById('cfg-precision');
1372-
prec.value = cfg.precision || 'fp32';
1373-
if (!prec.value) prec.value = 'fp32'; // fallback if not in <select>
1374-
document.getElementById('cfg-concurrency').value = cfg.concurrency || 4;
1375-
document.getElementById('cfg-batch').value = cfg.batch_size || 32;
1376-
document.getElementById('cfg-isl').value = cfg.input_tokens || 512;
1377-
document.getElementById('cfg-osl').value = cfg.output_tokens || 128;
1378-
document.getElementById('cfg-maxlen').value = cfg.max_model_len || 2048;
1379-
document.getElementById('cfg-tp').value = cfg.tensor_parallel_size || 1;
1380-
document.getElementById('cfg-pp').value = cfg.pipeline_parallel_size || 1;
1352+
document.getElementById('cfg-concurrency').value = cfg.concurrency || 4;
1353+
document.getElementById('cfg-maxlen').value = cfg.max_model_len || 2048;
1354+
document.getElementById('cfg-tp').value = cfg.gpu_count || 1;
1355+
// dataset_path has no catalog default (it's a path on the target GPU
1356+
// node, supplied per run) — leave it blank for the user to fill in,
1357+
// but carry over a previously-typed value if the user clicked Back.
1358+
document.getElementById('cfg-dataset-path').value = document.getElementById('cfg-dataset-path').value || cfg.dataset_path || '';
13811359
// Show step 2
13821360
document.getElementById('run-step1').style.display = 'none';
13831361
document.getElementById('run-step2').style.display = 'block';
@@ -1420,19 +1398,22 @@ <h3>Launch Jupyter Lab</h3>
14201398

14211399
// ── Start Run — Step 2: submit ──
14221400
async function startBenchmark() {
1401+
const datasetPath = document.getElementById('cfg-dataset-path').value.trim();
1402+
if (!datasetPath) {
1403+
document.getElementById('run-status').classList.add('visible');
1404+
document.getElementById('run-state').textContent =
1405+
'Error: Dataset Path is required — enter an absolute path to a ShareGPT-format JSON file that exists on the target node.';
1406+
return;
1407+
}
1408+
14231409
const body = {
14241410
model_name: document.getElementById('run-model').value.trim(),
14251411
node_ips: [document.getElementById('run-ip').value.trim()],
14261412
config: {
1427-
precision: document.getElementById('cfg-precision').value,
1428-
concurrency: parseInt(document.getElementById('cfg-concurrency').value),
1429-
input_tokens: parseInt(document.getElementById('cfg-isl').value),
1430-
output_tokens: parseInt(document.getElementById('cfg-osl').value),
1431-
max_model_len: parseInt(document.getElementById('cfg-maxlen').value),
1432-
batch_size: parseInt(document.getElementById('cfg-batch').value),
1433-
gpu_count: parseInt(document.getElementById('cfg-tp').value),
1434-
tensor_parallel_size: parseInt(document.getElementById('cfg-tp').value),
1435-
pipeline_parallel_size: parseInt(document.getElementById('cfg-pp').value),
1413+
concurrency: parseInt(document.getElementById('cfg-concurrency').value),
1414+
max_model_len: parseInt(document.getElementById('cfg-maxlen').value),
1415+
gpu_count: parseInt(document.getElementById('cfg-tp').value),
1416+
dataset_path: datasetPath,
14361417
},
14371418
};
14381419

0 commit comments

Comments
 (0)