@@ -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