Repository navigation
bugfix and docs: restructure response anomaly detection docs; remove empty payload_staging shell - #502
Merged
Conversation
|
🚫 PR 合入质量检查未通过,PR 已被禁止合入。 未通过项:
请按上述提示整改后,重新推送(push)或评论本 PR 即可触发再次检查。 |
The parenthetical noting the absence of a --no-response-anomaly flag adds noise rather than information: omitting --response-anomaly already implies detection is disabled.
Libotry
force-pushed
the
br_docs_modify
branch
from
August 27, 2026 12:08
faf283a to
b1c377b
Compare
|
✅ PR 合入质量五项检查全部通过,允许合入。 |
… tutorial The response anomaly detection section was previously embedded in cli_args.md, where it split the Configuration Constant File Parameters heading from its content (zh) and mixed feature-level guidance into a parameter reference page. Move it into a standalone advanced tutorial page (zh/en) restructured as a complete guide from dependency installation to configuration, fix the orphaned heading, point the --response-anomaly CLI rows to the new page, update all cross links (models/mode/accuracy_benchmark), and register the new page in the toctree.
|
✅ PR 合入质量五项检查全部通过,允许合入。 |
The wording 不增加即关闭/不增加则关闭 (omitting it disables detection) reads like omitting the flag actively disables the feature; reword to 不增加默认不开启 (not enabled by default) and align the English wording accordingly.
|
✅ PR 合入质量五项检查全部通过,允许合入。 |
The feature needs no config-file fields in practice: the model path field (always set for real runs) drives model-name derivation and msProbe config auto-generation, and payload retention is controlled by the --response-anomaly-payload-retention CLI switch. Drop the global and model-level response_anomaly config-block guidance from the tutorial, the models.md code sample and parameter table, and rework Quick Start around the two CLI switches.
|
✅ PR 合入质量五项检查全部通过,允许合入。 |
User-facing docs should not expose the internal detector implementation name. Replace msProbe/mindstudio-probe wording with neutral terms (built-in anomaly detection, detector source, detection configs) across the tutorial, cli_args/mode/accuracy_benchmark notes and the install guide, zh and en. The pip extra name response_anomaly remains the single user-facing handle for the dependency.
|
✅ PR 合入质量五项检查全部通过,允许合入。 |
…el repositories The path directory basename is the model-name source for detection; document that it must stay consistent with the model name on Hugging Face / ModelScope / Modelers and must not be renamed arbitrarily, in the models.md path row and the anomaly detection tutorial tip (zh/en).
|
✅ PR 合入质量五项检查全部通过,允许合入。 |
|
✅ PR 合入质量五项检查全部通过,允许合入。 |
Retention and staging cleanup both happen during archive finalization; use and/及 instead of or (zh/en).
|
✅ PR 合入质量五项检查全部通过,允许合入。 |
Detection cleanup only removed the per-dataset staging subtree (or renamed it away in all mode), leaving an empty payload_staging directory under response_anomaly/<model>. rmdir the staging root after the per-dataset cleanup; it only succeeds when the last dataset of the model finishes detection, so multi-dataset runs stay safe. Covered by a new UT; wording in the zh/en tutorial updated accordingly.
Libotry
temporarily deployed
to
smoke-test-approval
August 28, 2026 01:18 — with
GitHub Actions
Inactive
|
✅ PR 合入质量五项检查全部通过,允许合入。 |
The shard checksum value was formatted as sha256:<hex> while the field is already named sha256, duplicating the algorithm name. Store the bare hex digest in both manifest builders and strengthen the UT to compare against the hash recomputed from the shard file.
Libotry
temporarily deployed
to
smoke-test-approval
August 28, 2026 01:59 — with
GitHub Actions
Inactive
|
✅ PR 合入质量五项检查全部通过,允许合入。 |
…ion log The finalize step logged the aggregated summary with the exact same wording as the per-task completion line, making them indistinguishable in the console. The summary line now reads Response anomaly detection summary across N task(s). Per-task completion logs and dedicated task log files are unchanged; a new UT covers multi-dataset aggregation (summary totals) and per-task log isolation.
Libotry
temporarily deployed
to
smoke-test-approval
August 28, 2026 02:17 — with
GitHub Actions
Inactive
|
✅ PR 合入质量五项检查全部通过,允许合入。 |
zhongzhouTan-coder
approved these changes
Aug 28, 2026
2 of 15 tasks
2 of 15 tasks
zhongzhouTan-coder
pushed a commit
that referenced
this pull request
Sep 21, 2026
…566) * docs: remove redundant response_anomaly preset note from models.md The paragraph stating that the common model templates do not preconfigure response_anomaly adds no information (an unset field is the default state) and references a response_anomaly example block that no longer exists after #502, leaving a dangling pointer; remove it from zh/en. * docs: reword staging retention as keep-or-clean in anomaly tutorial The archive finalization step decides between keeping the staging data as archive or cleaning it up depending on the retention mode; use or (zh: 或) instead of and (zh: 及) in zh/en.
This branch was previously deployed
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.
PR Type / PR类型
Related Issue | 关联 Issue
#500 #501
🔍 Motivation / 变更动机
本 PR 覆盖响应异常检测的文档整理与一处收尾行为修复:
文档侧:
--response-anomaly参数说明中"(无--no-response-anomaly形态)"的括号注释专门强调一个并不存在的形态,属于冗余信息,容易引起误解。response_anomaly配置字段,但实际使用中无需任何配置:模型path(实际运行必填)已驱动模型名推导与检测配置自动生成,功能仅靠两个命令行参数即可完整开启与调整。随之而来,path末级目录名成为模型名的解析来源,需要提醒用户保持其与模型仓库中的模型名一致、勿随意改动。代码侧:
6. 检测收尾只清理了
payload_staging/<数据集>子目录(all模式下被 rename 走,其余模式被 rmtree),但response_anomaly/<模型>/payload_staging/目录本体残留为空壳,应在最后一个数据集检测完成后一并移除。7. payload 归档 manifest 的分片校验值格式为
"sha256": "sha256:<hex>",字段名与值前缀重复了算法名,应存裸十六进制摘要。8. workers 的检测汇总日志与单任务完成日志文案完全相同("Response anomaly detection completed"),控制台无法区分;汇总条应体现汇总语义。
This PR covers documentation cleanup plus one finalization-behavior fix for response anomaly detection. Docs: removed the redundant non-existent-flag note; moved the feature guide from cli_args.md into a standalone advanced tutorial (fixing the orphaned heading); reworded the default state to "off by default"; reworked the guide into a zero-config narrative (two CLI switches, model
pathdrives everything) with a reminder that thepathdirectory name must match the model-repo name; dropped internal msProbe/mindstudio-probe naming. Code: detection cleanup left an emptypayload_stagingshell directory underresponse_anomaly/<model>— the shell is now removed once the last dataset of the model finishes detection.📝 Modification / 修改内容
代码:
_process_staged_payloads在按数据集清理 staging 后,对payload_staging根目录执行rmdir()(仅空目录可删,OSError静默忽略):同模型多数据集场景下只有最后一个数据集收尾时才会真正删除空壳,无需额外状态跟踪。测试(
tests/UT/utils/test_response_anomaly.py):test_detection_removes_payload_staging_shell:构造带 payload_staging 的运行目录,驱动_detect全流程后断言payload_staging/<数据集>与payload_staging/目录本体均不存在。response_anomaly_jsonl.py:两个 manifest 构建点(writer 收尾与 build_jsonl_zstd_manifest)的分片 sha256 值去掉sha256:前缀,存裸十六进制摘要;对应 UT 断言升级为与分片文件重算哈希精确比对。workers.py:检测汇总日志改为带任务数的汇总语义("Response anomaly detection summary across N task(s)"),与单任务完成日志区分;单任务完成日志与任务专属日志保持不变。test_detect_summary_aggregates_across_tasks:验证多数据集下 summary 为全量聚合、各任务日志仅含本任务统计。文档:
--response-anomaly行的冗余括号注释。advanced_tutorials/response_anomaly_detection.md(概述 / 前置条件 / 安装依赖 / 快速使用 / 运行流程与落盘结构 / 检测结果说明 / 断点续跑),零配置叙事,快速使用仅需--response-anomaly与--response-anomaly-payload-retention两个命令行参数。response_anomaly参数行与代码示例配置块。path填写提醒(models.md 参数行 + 教程页提示,zh/en):末级目录名需与 Hugging Face / ModelScope / Modelers 模型名一致。Code:
_process_staged_payloadsnowrmdir()s thepayload_stagingroot after the per-dataset cleanup (rmdir only succeeds on an empty dir, so the shell disappears exactly when the last dataset of the model finalizes). Test: newtest_detection_removes_payload_staging_shellUT. Docs: standalone zh/en tutorial with zero-config narrative, wording fixes, de-branding,pathnaming reminder, and the staging-cleanup wording updated to match the new behavior.📐 Associated Test Results / 关联测试结果
python3 -m pytest tests/UT/utils/test_response_anomaly.py -q→ 46 passed(含新增用例)python3 -m pytest tests/UT/utils/test_response_anomaly_jsonl.py -q→ 3 passed(断言升级后)python3 -m pytest tests/UT/utils/test_response_anomaly.py tests/UT/cli/test_workers.py -q→ 83 passed(含新增用例)python3 -m pytest tests/UT/utils/test_response_anomaly_jsonl.py tests/UT/cli/test_config_manager.py -q→ 72 passed, 9 subtests passed/readthedocs build。Docs checks: repo-wide searches show zero stale anchors / old wording / config-field guidance / internal naming; all links resolve; LF endings; zh/en symmetric.
/readthedocs buildcan be triggered if needed.无。
payload_staging为运行期临时目录,检测完成后本就应消失;--reuse续跑逻辑依据 prediction/result 与 payload 归档匹配,不依赖该目录存在。 / None.无(单次空目录
rmdir,开销可忽略)。 / None.🌟 Use cases (Optional) / 使用案例(可选)
不涉及新功能 / N.A.
✅ Checklist / 检查列表
Before PR:
test_detection_removes_payload_staging_shell)After PR:
👥 Collaboration Info / 协作信息
🌟 Useful CI Command / 实用的CI命令
/gemini review/gemini summary/gemini help/readthedocs build/pr_check