Repository navigation
fix: 性能测试 — 修复进度条卡在0%、中止任务误报崩溃、增加 Tokenizer Path 字段 - #1520
Merged
Yunnglin merged 8 commits intoJul 27, 2026
Merged
Conversation
…ump, include frontend dist
…ath field - ProgressTracker.update() was never called — add call after each benchmark sweep so the web UI progress bar advances beyond 0%. - User-initiated stop (via /stop) raised a misleading 'Subprocess terminated unexpectedly (exit code -15)' RuntimeError. Introduce TaskStoppedError to distinguish intentional termination from a real crash, and return HTTP 200 instead of 500. - Frontend progress polling only checked percent >= 100 — also check status: 'error'/'completed' so the UI stops polling when the backend finishes or crashes. - Add Tokenizer Path field (hidden behind 'More Parameters' toggle) to PerfConfigForm, fixing 'Tokenizer path is required' error when using the random dataset.
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
…op detection - Remove per-sweep tracker.update(1): request-level updates already flow through TqdmLogging(track_progress=True); the extra +1 double-counted (empirically 101/100 = 101%). - Mark task as user-stopped BEFORE terminate() to close the race with the parent poll loop in run_in_subprocess. - Also honour the user-stop marker when the child converts SIGTERM into an error result; consume the marker once to avoid leaks.
…status; drop drive-by change
- Catch TaskStoppedError in eval _execute_task so stopping an eval task
returns {status: 'stopped'} instead of a 500, mirroring the perf blueprint.
- Declare the optional 'status' field on progressResponseSchema and drop the
Record cast in TaskRunnerPage (schema is the source of truth).
- Revert the unrelated model_dump(exclude_none=True) change in data_utils
(out of scope for this PR; propose separately with rationale).
- Add tests/service/test_process_stop.py covering graceful stop vs crash.
…PerfConfigForm tokenizer_path has no validator, so the MORE_PARAMS_IDS auto-expand branch was unreachable; re-introduce it together with the first validated field inside the collapsible section.
…ral completion - stop_process: only mark user-stopped when actually terminating a live child; stopping an already-exited process is a no-op returning False. - run_in_subprocess: drain the result queue before consulting the user-stop marker so a produced result always wins; this also unifies the duplicated error-result handling. - Add a regression test for stop-after-natural-exit.
Collaborator
|
感谢贡献!#2/#3/#4 三个问题确认真实存在,修复思路正确,已保留。 另外以 maintainer 身份在分支上追加了几个 commit:
CI 全绿,准备合入。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复内容
1. 进度条永远卡在 0%
根因:
ProgressTracker被创建但run_multi_benchmark从未调用update()。修复: 每完成一组 benchmark sweep 后调用
ProgressTracker.get_current().update(1)。(perf/main.py)2. 用户中止任务显示为"子进程崩溃"
根因:
/stop→proc.terminate()→run_in_subprocess检测到 exit code -15 → 500 错误。修复: 新增
TaskStoppedError区分主动停止和真正崩溃;蓝图层返回{status: 'stopped'}而非 500。(service/utils/process.py+blueprints/perf.py)3. 后端崩溃后前端仍显示 "Running..."
根因: 进度轮询只看
percent >= 100,不检查status: 'error'。修复: 轮询回调增加对
status === 'error'/'completed'的检测。(web/.../TaskRunnerPage.tsx)4.
random数据集缺少 tokenizer 路径输入框根因:
random数据集强制要求--tokenizer-path,但 Web UI 无对应输入框。修复: 新增"更多参数"折叠区,内含 Tokenizer Path 字段。(
web/.../PerfConfigForm.tsx)修改文件
evalscope/perf/main.pyProgressTracker.update()evalscope/service/utils/process.pyTaskStoppedError+_user_stopped_tasksevalscope/service/utils/__init__.pyTaskStoppedErrorevalscope/service/blueprints/perf.pyTaskStoppedError返回 200evalscope/web/src/components/perf/PerfConfigForm.tsxevalscope/web/src/components/tasks/TaskRunnerPage.tsxevalscope/web/src/i18n/translations/perf.ts测试