| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat: pipe pre-commit output through LLM renderer for compact diagnostics Co-authored-by: liujiawang<anonymousdev@163.com> # message auto-generated for no-merge-commit merge: !197 merge pre-commit into develop feat: pipe pre-commit output through LLM renderer for compact diagnostics Created-by: AvadaKedavrua Commit-by: liujiawang Merged-by: ascend-robot Description: **PR Type / PR类型** - [x] Feature(功能新增) - [ ] Bugfix(Bug 修复) - [ ] Docs(文档更新) - [ ] CI/CD(持续集成/持续部署) - [ ] Refactor(代码重构) - [ ] Perf(性能优化) - [ ] Test-Cases(测试用例更新) - [ ] Other(其他) ## 🔍 Motivation / 变更动机 Idea 来自于 rtk,让 pre-commit 的报错信息更适合 LLM 解决,省 80% 的 token。 使用方式: 1. uv run pre-commit install 注册 git hooks 2. patch .git/hooks/pre-commit pre-commit/llm_render.patch 第一步是注册 pre-commit,是使用 pre-commit 必备的一步 第二步是 patch hook,让输出对接到 llm_render.py。 当 PRE_COMMIT_LLM_FILTER=1 生效时,才会进行 filter,性能损耗可忽略不计 如果想手动执行,在根目录下: PRE_COMMIT_LLM_FILTER=1 uv run pre-commit run | pre-commit/llm_render.py 即可 ------ ## 📝 Modification / 修改内容 **Please briefly describe what modification is made in this PR.** **请简要描述此拉取请求中进行的修改。** ------ ## 📐 Associated Test Results / 关联测试结果 Before: `` [WARNING] Unstaged files detected. [INFO] Stashing unstaged files to /root/.cache/pre-commit/patch1778825692-1277080. trim trailing whitespace.................................................Passed fix end of files.........................................................Failed - hook id: end-of-file-fixer - exit code: 1 - files were modified by this hook Fixing test.py check yaml...........................................(no files to check)Skipped check for added large files..............................................Passed check for merge conflicts................................................Passed detect private key.......................................................Passed check json...........................................(no files to check)Skipped ruff check...............................................................Failed - hook id: ruff-check - exit code: 1 ::error title=Ruff (invalid-syntax),file=/root/workspace/gitcode/msmodeling/test.py,line=1,col=8,endLine=1,endColumn=9::test.py:1:8: invalid-syntax: Expected :, found = ::error title=Ruff (invalid-syntax),file=/root/workspace/gitcode/msmodeling/test.py,line=1,col=10,endLine=1,endColumn=11::test.py:1:10: invalid-syntax: Invalid annotated assignment target ::error title=Ruff (invalid-syntax),file=/root/workspace/gitcode/msmodeling/test.py,line=1,endLine=2::test.py:1:12: invalid-syntax: Expected an expression ::error title=Ruff (invalid-syntax),file=/root/workspace/gitcode/msmodeling/test.py,line=2,col=1,endLine=2,endColumn=5::test.py:2:1: invalid-syntax: Unexpected indentation ::error title=Ruff (invalid-syntax),file=/root/workspace/gitcode/msmodeling/test.py,line=3,col=1,endLine=3,endColumn=1::test.py:3:1: invalid-syntax: Expected a statement ruff format..............................................................Failed - hook id: ruff-format - exit code: 2 error: Failed to parse test.py:1:8: Expected :, found = codespell................................................................Passed pylint (Python code quality check).......................................Failed - hook id: pylint - exit code: 2 ************* Module msmodeling.test test.py:1:4: E0001: Parsing failed: 'cannot assign to literal here. Maybe you meant '==' instead of '='? (msmodeling.test, line 1)' (syntax-error) bandit (Python security checks)..........................................Passed typos....................................................................Passed [WARNING] Stashed changes conflicted with hook auto-fixes... Rolling back fixes... [INFO] Restored changes from /root/.cache/pre-commit/patch1778825692-1277080. After: end-of-file-fixer - test.py > (fixed) ruff-check - msmodeling/test.py > 1:8 invalid-syntax: test.py:1:8: invalid-syntax: Expected :, found = > 1:10 invalid-syntax: test.py:1:10: invalid-syntax: Invalid annotated assignment target > 2:1 invalid-syntax: test.py:2:1: invalid-syntax: Unexpected indentation > 3:1 invalid-syntax: test.py:3:1: invalid-syntax: Expected a statement ruff-format - test.py > 1:8 Expected :, found = pylint - test.py > 1:4 E0001: Parsing failed: 'cannot assign to literal here. Maybe you meant '==' instead of '='? (msmodeling.test, line 1)' (syntax-error) `` ------ ## 🌟 Use cases (Optional) / 使用案例(可选) **If this PR introduces a new feature, it is better to list some use cases here and update the documentation.** **如果此拉取请求引入了新功能,最好在此处列出一些用例并更新文档。** ------ ## ✅ Checklist / 检查列表 **Before PR**: - [ ] Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests. / 修复的 Bug 已完全由单元测试覆盖,导致 Bug 的情况应在单元测试中添加。 - [ ] The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness. / 此拉取请求中的修改已完全由单元测试覆盖。如果不是,请添加更多单元测试以确保正确性。 - [ ] All relevant documentation (API docs, docstrings, example tutorials) has been updated to reflect these changes. / 所有相关文档(API 文档、文档字符串、示例教程)已更新以反映这些更改。 - [ ] Please ensure code files contain no Chinese comments. / 请保证代码文件中不含中文注释。 ------ See merge request: Ascend/msmodeling!197 | 1 个月前 | |
feat: pipe pre-commit output through LLM renderer for compact diagnostics Co-authored-by: liujiawang<anonymousdev@163.com> # message auto-generated for no-merge-commit merge: !197 merge pre-commit into develop feat: pipe pre-commit output through LLM renderer for compact diagnostics Created-by: AvadaKedavrua Commit-by: liujiawang Merged-by: ascend-robot Description: **PR Type / PR类型** - [x] Feature(功能新增) - [ ] Bugfix(Bug 修复) - [ ] Docs(文档更新) - [ ] CI/CD(持续集成/持续部署) - [ ] Refactor(代码重构) - [ ] Perf(性能优化) - [ ] Test-Cases(测试用例更新) - [ ] Other(其他) ## 🔍 Motivation / 变更动机 Idea 来自于 rtk,让 pre-commit 的报错信息更适合 LLM 解决,省 80% 的 token。 使用方式: 1. uv run pre-commit install 注册 git hooks 2. patch .git/hooks/pre-commit pre-commit/llm_render.patch 第一步是注册 pre-commit,是使用 pre-commit 必备的一步 第二步是 patch hook,让输出对接到 llm_render.py。 当 PRE_COMMIT_LLM_FILTER=1 生效时,才会进行 filter,性能损耗可忽略不计 如果想手动执行,在根目录下: PRE_COMMIT_LLM_FILTER=1 uv run pre-commit run | pre-commit/llm_render.py 即可 ------ ## 📝 Modification / 修改内容 **Please briefly describe what modification is made in this PR.** **请简要描述此拉取请求中进行的修改。** ------ ## 📐 Associated Test Results / 关联测试结果 Before: `` [WARNING] Unstaged files detected. [INFO] Stashing unstaged files to /root/.cache/pre-commit/patch1778825692-1277080. trim trailing whitespace.................................................Passed fix end of files.........................................................Failed - hook id: end-of-file-fixer - exit code: 1 - files were modified by this hook Fixing test.py check yaml...........................................(no files to check)Skipped check for added large files..............................................Passed check for merge conflicts................................................Passed detect private key.......................................................Passed check json...........................................(no files to check)Skipped ruff check...............................................................Failed - hook id: ruff-check - exit code: 1 ::error title=Ruff (invalid-syntax),file=/root/workspace/gitcode/msmodeling/test.py,line=1,col=8,endLine=1,endColumn=9::test.py:1:8: invalid-syntax: Expected :, found = ::error title=Ruff (invalid-syntax),file=/root/workspace/gitcode/msmodeling/test.py,line=1,col=10,endLine=1,endColumn=11::test.py:1:10: invalid-syntax: Invalid annotated assignment target ::error title=Ruff (invalid-syntax),file=/root/workspace/gitcode/msmodeling/test.py,line=1,endLine=2::test.py:1:12: invalid-syntax: Expected an expression ::error title=Ruff (invalid-syntax),file=/root/workspace/gitcode/msmodeling/test.py,line=2,col=1,endLine=2,endColumn=5::test.py:2:1: invalid-syntax: Unexpected indentation ::error title=Ruff (invalid-syntax),file=/root/workspace/gitcode/msmodeling/test.py,line=3,col=1,endLine=3,endColumn=1::test.py:3:1: invalid-syntax: Expected a statement ruff format..............................................................Failed - hook id: ruff-format - exit code: 2 error: Failed to parse test.py:1:8: Expected :, found = codespell................................................................Passed pylint (Python code quality check).......................................Failed - hook id: pylint - exit code: 2 ************* Module msmodeling.test test.py:1:4: E0001: Parsing failed: 'cannot assign to literal here. Maybe you meant '==' instead of '='? (msmodeling.test, line 1)' (syntax-error) bandit (Python security checks)..........................................Passed typos....................................................................Passed [WARNING] Stashed changes conflicted with hook auto-fixes... Rolling back fixes... [INFO] Restored changes from /root/.cache/pre-commit/patch1778825692-1277080. After: end-of-file-fixer - test.py > (fixed) ruff-check - msmodeling/test.py > 1:8 invalid-syntax: test.py:1:8: invalid-syntax: Expected :, found = > 1:10 invalid-syntax: test.py:1:10: invalid-syntax: Invalid annotated assignment target > 2:1 invalid-syntax: test.py:2:1: invalid-syntax: Unexpected indentation > 3:1 invalid-syntax: test.py:3:1: invalid-syntax: Expected a statement ruff-format - test.py > 1:8 Expected :, found = pylint - test.py > 1:4 E0001: Parsing failed: 'cannot assign to literal here. Maybe you meant '==' instead of '='? (msmodeling.test, line 1)' (syntax-error) `` ------ ## 🌟 Use cases (Optional) / 使用案例(可选) **If this PR introduces a new feature, it is better to list some use cases here and update the documentation.** **如果此拉取请求引入了新功能,最好在此处列出一些用例并更新文档。** ------ ## ✅ Checklist / 检查列表 **Before PR**: - [ ] Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests. / 修复的 Bug 已完全由单元测试覆盖,导致 Bug 的情况应在单元测试中添加。 - [ ] The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness. / 此拉取请求中的修改已完全由单元测试覆盖。如果不是,请添加更多单元测试以确保正确性。 - [ ] All relevant documentation (API docs, docstrings, example tutorials) has been updated to reflect these changes. / 所有相关文档(API 文档、文档字符串、示例教程)已更新以反映这些更改。 - [ ] Please ensure code files contain no Chinese comments. / 请保证代码文件中不含中文注释。 ------ See merge request: Ascend/msmodeling!197 | 1 个月前 | |
chore(ci): adopt pre-commit and retire legacy lintrunner adapters Co-authored-by: liujiawang<anonymousdev@163.com> # message auto-generated for no-merge-commit merge: !176 merge pre-commit into develop chore(ci): adopt pre-commit and retire legacy lintrunner adapters Created-by: AvadaKedavrua Commit-by: liujiawang;AvadaKedavrua Merged-by: ascend-robot Description: Thanks for your contribution; we appreciate it a lot. The following instructions will make your pull request healthier and help you get feedback more easily. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers. 感谢您的贡献,我们非常重视。以下说明将使您的拉取请求更健康,更易于获得反馈。如果您不理解某些项目,请不要担心,只需提交拉取请求并从维护人员那里寻求帮助即可。 **PR Type / PR类型** - [ ] Feature(功能新增) - [ ] Bugfix(Bug 修复) - [x] Docs(文档更新) - [x] CI/CD(持续集成/持续部署) - [ ] Refactor(代码重构) - [ ] Perf(性能优化) - [ ] Test-Cases(测试用例更新) - [ ] Other(其他) ------ ## Motivation / 变更动机 Continue the **pre-commit** migration: tighten **Pylint** so only high-signal messages run ( disable=all + explicit enable list), fix real issues that remained under that profile, and translate hook/config comments to **English**. ------ ## Configuration changes(仅工具与注释 / tooling & comments only) | Path | What changed | |------|----------------| | pre-commit/pyproject.toml | **Pylint:** [tool.pylint."messages control"] with disable = ["all"] and a short **allowlist** of message IDs (E0100, E0601–E0611, E0632, E1101, E1120, W0632, W1514). **Ruff:** unchanged behavior; comments translated to English. **Bandit:** comments translated; rule allowlist/skip lists unchanged. | | .pre-commit-config.yaml | Comments translated to English; Bandit hook display name set to **bandit (Python security checks)**. Hook versions and args unchanged except for comment text. | ------ ## Source code changes(应用代码 / application code) | Area | Files | Purpose | |------|--------|---------| | serving_cast | communication.py, engine.py, instance.py, kv_cache_manager.py, load_gen.py, main.py, model_runner.py, request.py, serving.py, utils.py | Replace from . import stime with import serving_cast.stime as stime so Pylint resolves imports (fixes **E0611**). | | serving_cast | stime.py | Singleton **salabim** Environment via _get_sim_env() so type checkers/Pylint see **sim.Environment** (fixes **E1101** on SimulationEnv). | | serving_cast/service | base_throughput_optimizer.py | __init__ defaults + assert runner is not None before run_inference (fixes **E1101** on base class). | | tensor_cast | diffusers/diffusers_model.py, diffusers/diffusers_utils.py, runtime.py | Add **encoding="utf-8"** to open() / trace export (fixes **W1514**). | | web_ui | callbacks.py | **refresh_optimizer_detail:** call _optimizer_detail_view(rows, None, device) and unpack five return values (fixes **E1120**). | ------ ## Recent commits on pre-commit branch - ci(pre-commit): fix pylint message selection with disable=all - fix: resolve pylint findings in serving_cast, tensor_cast, and web_ui - docs(pre-commit): translate comments to English and add all-files run log ------  ------ ## Checklist / 检查列表 - [x] Please ensure code files contain no Chinese comments. / 请保证代码文件中不含中文注释。 See merge request: Ascend/msmodeling!176 | 1 个月前 | |
chore(ci): adopt pre-commit and retire legacy lintrunner adapters Co-authored-by: liujiawang<anonymousdev@163.com> # message auto-generated for no-merge-commit merge: !176 merge pre-commit into develop chore(ci): adopt pre-commit and retire legacy lintrunner adapters Created-by: AvadaKedavrua Commit-by: liujiawang;AvadaKedavrua Merged-by: ascend-robot Description: Thanks for your contribution; we appreciate it a lot. The following instructions will make your pull request healthier and help you get feedback more easily. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers. 感谢您的贡献,我们非常重视。以下说明将使您的拉取请求更健康,更易于获得反馈。如果您不理解某些项目,请不要担心,只需提交拉取请求并从维护人员那里寻求帮助即可。 **PR Type / PR类型** - [ ] Feature(功能新增) - [ ] Bugfix(Bug 修复) - [x] Docs(文档更新) - [x] CI/CD(持续集成/持续部署) - [ ] Refactor(代码重构) - [ ] Perf(性能优化) - [ ] Test-Cases(测试用例更新) - [ ] Other(其他) ------ ## Motivation / 变更动机 Continue the **pre-commit** migration: tighten **Pylint** so only high-signal messages run ( disable=all + explicit enable list), fix real issues that remained under that profile, and translate hook/config comments to **English**. ------ ## Configuration changes(仅工具与注释 / tooling & comments only) | Path | What changed | |------|----------------| | pre-commit/pyproject.toml | **Pylint:** [tool.pylint."messages control"] with disable = ["all"] and a short **allowlist** of message IDs (E0100, E0601–E0611, E0632, E1101, E1120, W0632, W1514). **Ruff:** unchanged behavior; comments translated to English. **Bandit:** comments translated; rule allowlist/skip lists unchanged. | | .pre-commit-config.yaml | Comments translated to English; Bandit hook display name set to **bandit (Python security checks)**. Hook versions and args unchanged except for comment text. | ------ ## Source code changes(应用代码 / application code) | Area | Files | Purpose | |------|--------|---------| | serving_cast | communication.py, engine.py, instance.py, kv_cache_manager.py, load_gen.py, main.py, model_runner.py, request.py, serving.py, utils.py | Replace from . import stime with import serving_cast.stime as stime so Pylint resolves imports (fixes **E0611**). | | serving_cast | stime.py | Singleton **salabim** Environment via _get_sim_env() so type checkers/Pylint see **sim.Environment** (fixes **E1101** on SimulationEnv). | | serving_cast/service | base_throughput_optimizer.py | __init__ defaults + assert runner is not None before run_inference (fixes **E1101** on base class). | | tensor_cast | diffusers/diffusers_model.py, diffusers/diffusers_utils.py, runtime.py | Add **encoding="utf-8"** to open() / trace export (fixes **W1514**). | | web_ui | callbacks.py | **refresh_optimizer_detail:** call _optimizer_detail_view(rows, None, device) and unpack five return values (fixes **E1120**). | ------ ## Recent commits on pre-commit branch - ci(pre-commit): fix pylint message selection with disable=all - fix: resolve pylint findings in serving_cast, tensor_cast, and web_ui - docs(pre-commit): translate comments to English and add all-files run log ------  ------ ## Checklist / 检查列表 - [x] Please ensure code files contain no Chinese comments. / 请保证代码文件中不含中文注释。 See merge request: Ascend/msmodeling!176 | 1 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 |