Skip to content

Commit 9c5cb8d

Browse files
committed
try again
1 parent 45a83e7 commit 9c5cb8d

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4+
cd "$SCRIPT_DIR"
5+
6+
MODEL_URL=$1
7+
8+
wget https://huggingface.co/datasets/anon8231489123/ShareGPT_Vicuna_unfiltered/resolve/main/ShareGPT_V3_unfiltered_cleaned_split.json
9+
10+
python3 data_preprocessing.py --parse 1 --model-url "$MODEL_URL"
11+
12+
rm "ShareGPT_V3_unfiltered_cleaned_split.json"
13+

run-bench.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,8 @@ def sharegpt_run_workload(sharegpt_config: Dict[str, Any]) -> None:
362362

363363
os.chmod(workload_exec_script_path, 0o755)
364364

365+
global MODEL_URL
366+
365367
cmd = [str(workload_exec_script_path)]
366368
cmd.extend([str(MODEL_URL)])
367369
cmd.extend(["http://localhost:30080/v1/"]) # the base URL when serving with production stack
@@ -384,12 +386,13 @@ def sharegpt_run_workload(sharegpt_config: Dict[str, Any]) -> None:
384386
else:
385387
raise RuntimeError("Failed to run ShareGPT workload")
386388

387-
def synthetic_sharegpt_data_generation(model_url: str) -> None:
389+
def synthetic_sharegpt_data_generation() -> None:
388390
"""Generate ShareGPT data for synthetic workload."""
389391
print("Generating ShareGPT data for synthetic workload...")
390392
data_gen_script_path = Path(__file__).parent / '3-workloads' / 'synthetic' / 'prepare_synthetic_sharegpt.sh'
391393
os.chmod(data_gen_script_path, 0o755)
392-
result = subprocess.run([str(data_gen_script_path), str(model_url)], check=True)
394+
global MODEL_URL
395+
result = subprocess.run([str(data_gen_script_path), str(MODEL_URL)], check=True)
393396

394397
if result.returncode == 0:
395398
print("ShareGPT data generation completed successfully into 4-latest-results/sharegpt-data.json")
@@ -403,6 +406,8 @@ def run_synthetic(synthetic_config: Dict[str, Any]) -> None:
403406
if not hasattr(run_synthetic, 'share_gpt_generated'):
404407
run_synthetic.share_gpt_generated = False
405408

409+
global MODEL_URL
410+
406411
qps_values = synthetic_config.get('QPS')
407412
NUM_USERS_WARMUP = synthetic_config.get('NUM_USERS_WARMUP')
408413
NUM_USERS = synthetic_config.get('NUM_USERS')
@@ -412,7 +417,7 @@ def run_synthetic(synthetic_config: Dict[str, Any]) -> None:
412417
ANSWER_LEN = synthetic_config.get('ANSWER_LEN')
413418
USE_SHAREGPT = synthetic_config.get('USE_SHAREGPT', False)
414419
if USE_SHAREGPT and (not run_synthetic.share_gpt_generated):
415-
synthetic_sharegpt_data_generation(MODEL_URL)
420+
synthetic_sharegpt_data_generation()
416421
run_synthetic.share_gpt_generated = True
417422

418423
workload_exec_script_path = Path(__file__).parent / '3-workloads' / 'synthetic' / 'run_synthetic.sh'
@@ -472,6 +477,8 @@ def run_mooncake(mooncake_config: Dict[str, Any]) -> None:
472477

473478
os.chmod(workload_exec_script_path, 0o755)
474479

480+
global MODEL_URL
481+
475482
cmd = [str(workload_exec_script_path)]
476483
cmd.extend([str(MODEL_URL)])
477484
cmd.extend(["http://localhost:30080/v1/"]) # the base URL when serving with production stack
@@ -521,6 +528,8 @@ def run_agentic(agentic_config: Dict[str, Any]) -> None:
521528

522529
os.chmod(workload_exec_script_path, 0o755)
523530

531+
global MODEL_URL
532+
524533
cmd = [str(workload_exec_script_path)]
525534
cmd.extend([str(MODEL_URL)])
526535
cmd.extend(["http://localhost:30080/v1/"]) # the base URL when serving with production stack

0 commit comments

Comments
 (0)