Skip to content

benchmark and profiling suite - #207

Merged
majunze2001 merged 4 commits into
masterfrom
jm-benchmark-suite
May 25, 2026
Merged

benchmark and profiling suite#207
majunze2001 merged 4 commits into
masterfrom
jm-benchmark-suite

Conversation

@majunze2001

Copy link
Copy Markdown
Collaborator

No description provided.

majunze2001 and others added 3 commits May 24, 2026 14:49
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>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +523 to +526
buffer += chunk
while b"\n" in buffer:
line_bytes, buffer = buffer.split(b"\n", 1)
line = line_bytes.decode("utf-8").strip()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Suggested change
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)

Comment thread benchmark/otel_utils.py
if not shape_str.startswith("["):
return None
return eval(shape_str)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

Using eval() on data retrieved from external sources (even Jaeger tags) is a security risk. Since the expected format is a simple numeric list, json.loads() is a safer alternative.

Suggested change
return json.loads(shape_str)

Comment thread benchmark/app_utils.py
Comment on lines +220 to +221
f' encoder_tp_size={inner.encoder_tp_size},',
f' encoder_tp_size={inner.encoder_tp_size},',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The encoder_tp_size parameter is redundantly assigned twice in the generated MixedQwenImageTask definition. One of these lines should be removed.

Suggested change
f' encoder_tp_size={inner.encoder_tp_size},',
f' encoder_tp_size={inner.encoder_tp_size},',
f' encoder_tp_size={inner.encoder_tp_size},',

@majunze2001
majunze2001 merged commit c17dae1 into master May 25, 2026
2 checks passed
@majunze2001
majunze2001 deleted the jm-benchmark-suite branch May 25, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant