benchmark and profiling suite - #207
Conversation
Co-authored-by: Jisang Ahn <michahn@umich.edu> Co-authored-by: Yizhuo Liang <yizhuo.liang.hello@gmail.com> Co-authored-by: Runyu Lu <lry89757@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request overhauls the Cornserve benchmarking infrastructure, introducing a unified framework for profiling Eric, MLLM, and Geri applications. Key features include a GPU-aware batch scheduler for synchronized experiment execution, a robust dataset sampling system with persistence, and integrated performance analysis using OpenTelemetry traces and Prometheus metrics. The changes also address trace leakage in streaming responses and improve resource management within the gateway. Feedback from the review highlighted a logic error in SSE stream handling for the talker service, a security risk regarding the use of eval() on external data, and a redundant parameter assignment in the image task generation logic.
| buffer += chunk | ||
| while b"\n" in buffer: | ||
| line_bytes, buffer = buffer.split(b"\n", 1) | ||
| line = line_bytes.decode("utf-8").strip() |
There was a problem hiding this comment.
The invoke_talker_vocoder function appears to be missing logic to handle the data: prefix and the [DONE] sentinel common in SSE streams, which is handled correctly in invoke_mllm. If the talker service returns SSE, json.loads will fail on the raw line.
| buffer += chunk | |
| while b"\n" in buffer: | |
| line_bytes, buffer = buffer.split(b"\n", 1) | |
| line = line_bytes.decode("utf-8").strip() | |
| if not line: | |
| continue | |
| if line.startswith("data: "): | |
| line = line[6:] | |
| if not line: | |
| continue | |
| if line == "[DONE]": | |
| break | |
| try: | |
| data = json.loads(line) |
| if not shape_str.startswith("["): | ||
| return None | ||
| return eval(shape_str) | ||
|
|
| f' encoder_tp_size={inner.encoder_tp_size},', | ||
| f' encoder_tp_size={inner.encoder_tp_size},', |
There was a problem hiding this comment.
The encoder_tp_size parameter is redundantly assigned twice in the generated MixedQwenImageTask definition. One of these lines should be removed.
| f' encoder_tp_size={inner.encoder_tp_size},', | |
| f' encoder_tp_size={inner.encoder_tp_size},', | |
| f' encoder_tp_size={inner.encoder_tp_size},', |
No description provided.