Skip to content

fix(perf): generate HTML report for open-loop runs with no fixed rate (rate=-1.0) - #1503

Merged
Yunnglin merged 2 commits into
modelscope:mainfrom
qiumuyang:fix/open-loop-rate-html-report
Jul 22, 2026
Merged

Yunnglin merged 2 commits into
modelscope:mainfrom
qiumuyang:fix/open-loop-rate-html-report

Conversation

@qiumuyang

@qiumuyang qiumuyang commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Open-loop perf runs that don't pin a fixed request rate produce no perf_report.html — it's silently skipped, even though performance_summary.txt, benchmark_summary.json, benchmark_percentile.json, and benchmark_data.db are all written correctly.

For example, workload_trace replay (driven by trace arrival offsets, no --rate) ends the run with:

INFO: Performance summary saved to: .../performance_summary.txt
WARNING: No benchmark runs found under .../outputs/<name>. Skipping HTML report.

Root cause

When rate is unset, the benchmark records Request Rate = -1.0 (sentinel) and writes the run sub-directory as rate_-1.0_number_<M>. The loader regex has no sign in its character class, so the directory never matches and RunLoader.load_all() drops it:

# evalscope/perf/utils/report/perf_data.py
_RATE_RE = re.compile(r'^rate_([\d.]+)_number_(\d+)$')   # rejects the leading '-'

With zero runs returned, gen_perf_html_report() logs "No benchmark runs found ... Skipping HTML report" and returns ''.

Fix

Allow an optional leading sign on the rate capture group:

_RATE_RE = re.compile(r'^rate_(-?[\d.]+)_number_(\d+)$')

Positive-rate run dirs (rate_1.5_number_4) still match; parallel_* is unaffected.

Verification

Re-ran a workload_trace open-loop run (rate=-1.0, 30 reqs) against a vLLM endpoint (--enable-prompt-tokens-details):

  • Before: WARNING: No benchmark runs found ... Skipping HTML report. — no perf_report.html.
  • After: HTML report generated: .../perf_report.html (165 KB interactive report, 26/30 success; 4 failures are unrelated ServerDisconnectedError).

Run dir confirmed named rate_-1.0_number_30 — i.e. the negative-rate path that previously failed discovery.

🤖 Generated with Claude Code

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

…enerated

Open-loop runs that don't pin a fixed request rate write the run directory
as ``rate_-1.0_number_<M>`` (``-1.0`` is the Request Rate sentinel when rate
is unset, e.g. workload_trace replay driven by trace arrival offsets). The
loader regex had no sign in its character class, so the directory never
matched and ``RunLoader.load_all`` dropped it — ``gen_perf_html_report``
then saw zero runs and logged "No benchmark runs found ... Skipping HTML
report", silently not producing ``perf_report.html``.

Allow an optional leading sign on the rate capture group.

Verified by re-running a workload_trace open-loop (rate=-1.0) run against a
vLLM endpoint: perf_report.html is now generated (previously skipped).

Co-Authored-By: Claude <noreply@anthropic.com>
@qiumuyang
qiumuyang force-pushed the fix/open-loop-rate-html-report branch from 7d7291d to cb6c0d8 Compare July 22, 2026 06:05
Follow-up to the rate=-1.0 loader fix. RunData.name and perf_charts._x_axis
re-parsed the run directory name with their own sign-less regexes, so an
open-loop run with no fixed rate (rate_-1.0_number_M) was still mislabeled as
"Parallel 0" and its sweep charts used a "Concurrency" x-axis.

- perf_charts._x_axis: detect open-loop via RunData.is_open_loop; drop _RATE_DIR_RE
- RunData.name: derive label from is_open_loop/rate; render the rate<0 sentinel
  as "Open-loop / Number M" instead of a meaningless "Rate -1.0 rps"
- add network-free unit test tests/perf/test_perf_report_loader.py
@Yunnglin

Copy link
Copy Markdown
Collaborator

Reproduced and verified. Pushed a small follow-up (70ce1c5): derive open-loop from RunData.is_open_loop so the run is labeled "Open-loop / Number M" with a "Rate (req/s)" axis (instead of "Parallel 0" / "Concurrency"), plus a unit test. lint + perf tests pass. LGTM!

@Yunnglin Yunnglin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@Yunnglin
Yunnglin merged commit 82395a7 into modelscope:main Jul 22, 2026
3 checks passed
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.

2 participants