Skip to content

Commit

Permalink
Fixed query list id out-of-range issue (#65)
Browse files Browse the repository at this point in the history
* Fixed query list id out-of-range issue

Signed-off-by: Li Gang <gang.g.li@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Li Gang <gang.g.li@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
gavinlichn and pre-commit-ci[bot] authored Aug 21, 2024
1 parent 6a390da commit 7b719de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion evals/benchmark/stresscli/locust/chatqnabench.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ def getUrl():


def getReqData():
qid = random.randint(1, 189)
qlen = len(qlist)
qid = random.randint(0, qlen - 1)
logging.debug(f"Selected question: {qlist[qid]['qText']}")

return {"messages": qlist[qid]["qText"], "max_tokens": 128}
Expand Down

0 comments on commit 7b719de

Please sign in to comment.