-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add performance test lib & Dataset.stress_test function #500
Conversation
sujubaima
commented
Apr 30, 2024
- Description: Add a locust-based library for performance testing and a Dataset.stress_test interface which allows users to start a performance test task.
- Dependencies: locust>=2.20.0, urllib3<=1.26.15
|
||
start_time = time.time() | ||
start_perf_counter = time.perf_counter() | ||
responses = self.chat_comp.do(messages=messages, **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里解出来是拿到 hyperparameters={}
,底层请求的组件并不会接收这一参数,需要传的是 **(hyperparameters 的值)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
model: str, | ||
data_column: str = "prompt", | ||
hyperparameters: Dict[str, Any] = None, | ||
) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
函数返回值应该是一个 Dataset
对象?即会把单条的请求信息,包括请求的参数、回包、错误码、Token 延迟、总延迟等信息全部记录下来,最后形成一个数据集?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
目前暂时只保留了抽样和聚合数据的csv
user=self, | ||
pool_manager=self.pool_manager, | ||
) | ||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
后面可以考虑text2image等模型的场景
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM