Skip to content

Commit

Permalink
bugfix: 修复在对话场景下压测输入长度数据不对的问题 (#835)
Browse files Browse the repository at this point in the history
* 修复在对话场景下压测数据不对的问题

* 重命名 TotalQuery
  • Loading branch information
Dobiichi-Origami authored Oct 15, 2024
1 parent b9424ba commit 9c7d006
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/qianfan/dataset/stress_test/load_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def gen_brief(
+ "SendQuery: %s\n" % round(total_count, 2)
+ "SuccessQuery: %s\n" % round(success_count, 2)
+ "FailureQuery: %s\n" % round(failure_count, 2)
+ "TotalQuery: %s\n" % round(count, 2)
+ "DataEntryCount: %s\n" % round(count, 2)
+ "TotalTime: %s\n" % round(time, 2)
+ "SuccessRate: %s%%" % success_rate
)
Expand Down
2 changes: 1 addition & 1 deletion python/qianfan/dataset/stress_test/qianfan_llm_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ def _prepare_request_meta(self, context: Dict, **kwargs: Any) -> Dict:

request_meta: Dict[str, Any] = {
"response_length": 0,
"request_length": sum([len(msg) for msg in messages]),
"request_length": sum([len(msg["content"]) for msg in messages]),
}

return request_meta
Expand Down

0 comments on commit 9c7d006

Please sign in to comment.