Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 21, 2024
1 parent 1c61cc3 commit 85b3e62
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 3 additions & 1 deletion evals/benchmark/stresscli/commands/load_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ def run_locust_test(kubeconfig, global_settings, run_settings, output_folder, in
runspec["dataset"] = locust_defaults["dataset"] if runspec["dataset"] is None else runspec["dataset"]
runspec["prompts"] = run_settings.get("prompts", global_settings.get("prompts", locust_defaults["prompts"]))
runspec["prompts"] = locust_defaults["prompts"] if runspec["prompts"] is None else runspec["prompts"]
runspec["max_output"] = run_settings.get("max-output", global_settings.get("max-output", locust_defaults["max-output"]))
runspec["max_output"] = run_settings.get(
"max-output", global_settings.get("max-output", locust_defaults["max-output"])
)
runspec["max_output"] = locust_defaults["max-output"] if runspec["max_output"] is None else runspec["max_output"]
runspec["seed"] = run_settings.get("seed", global_settings.get("seed", locust_defaults["seed"]))
runspec["seed"] = locust_defaults["seed"] if runspec["seed"] is None else runspec["seed"]
Expand Down
7 changes: 2 additions & 5 deletions evals/benchmark/stresscli/locust/aistress.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,10 @@ def _(parser):
help="User-customized prompts",
)
parser.add_argument(
"--max-output",
type=int,
env_var="OPEA_EVAL_MAX_OUTPUT_TOKENS",
default=128,
help="Max number of output tokens"
"--max-output", type=int, env_var="OPEA_EVAL_MAX_OUTPUT_TOKENS", default=128, help="Max number of output tokens"
)


reqlist = []
start_ts = 0
end_ts = 0
Expand Down
2 changes: 2 additions & 0 deletions evals/benchmark/stresscli/locust/chatqnafixed.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
# SPDX-License-Identifier: Apache-2.0

import os

import tokenresponse as token

opea_eval_prompts = os.environ["OPEA_EVAL_PROMPTS"]
max_new_tokens = int(os.environ["OPEA_EVAL_MAX_OUTPUT_TOKENS"])


def getUrl():
return "/v1/chatqna"

Expand Down

0 comments on commit 85b3e62

Please sign in to comment.