Skip to content
This repository was archived by the owner on Dec 17, 2025. It is now read-only.

Commit ae8a418

Browse files
authored
Update llmperf.py (#20)
* Update llmperf.py correct merge with #15 Signed-off-by: kYLe <kyle@anyscale.com> * Update llmperf.py Signed-off-by: kYLe <kyle@anyscale.com> --------- Signed-off-by: kYLe <kyle@anyscale.com>
1 parent ccd4605 commit ae8a418

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

llmperf.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ def validate(
118118
response = openai.ChatCompletion.create(
119119
model=ep_config.model,
120120
messages=messages,
121-
api_key=ep_config["api_key"],
122-
api_base=ep_config["api_base"],
121+
api_key=ep_config.api_key,
122+
api_base=ep_config.api_base,
123123
max_tokens=max_tokens,
124124
# Please keep temp at 0. Otherwise increases the number of mismatches.
125125
temperature=0,
@@ -470,18 +470,18 @@ def error_analysis(df):
470470
elif framework == Framework.SAGEMAKER:
471471
import boto3
472472

473-
endpoint_config["api_base"] = "SageMaker Endpoint"
474-
endpoint_config["region"] = os.environ["SAGEMAKER_REGION"]
475-
endpoint_config["endpoint_name"] = os.environ["SAGEMAKER_ENDPOINT_NAME"]
473+
endpoint_config.api_base = "SageMaker Endpoint"
474+
endpoint_config.region = os.environ["SAGEMAKER_REGION"]
475+
endpoint_config.endpoint_name = os.environ["SAGEMAKER_ENDPOINT_NAME"]
476476
elif args.framework == "vllm":
477-
endpoint_config["api_base"] = os.environ["VLLM_API_BASE"]
478-
endpoint_config["api_key"] = os.environ["VLLM_API_KEY"]
477+
endpoint_config.api_base = os.environ["VLLM_API_BASE"]
478+
endpoint_config.api_key = os.environ["VLLM_API_KEY"]
479479
elif args.framework == "tgi":
480-
endpoint_config["api_base"]=os.environ["TGI_API_BASE"]
481-
endpoint_config["api_key"]=os.environ["TGI_API_KEY"]
480+
endpoint_config.api_base=os.environ["TGI_API_BASE"]
481+
endpoint_config.api_key=os.environ["TGI_API_KEY"]
482482

483-
endpoint_config["framework"] = args.framework
484-
endpoint_config["model"] = args.model
483+
endpoint_config.framework = args.framework
484+
endpoint_config.model = args.model
485485
f = open(args.random_lines_file_name, "r")
486486
sample_lines = f.readlines()
487487
f.close()

0 commit comments

Comments
 (0)