已合并
[test]skip_test_jacfwd #39004
SCh_zx创建于 6月23日
[test]skip_test_jacfwd #39004
已合并
SCh_zx创建于 6月23日
SCh_zx成员
6月23日

【合入来源】

如有社区issue,请关联issue链接
请勿携带内部流程信息(需求链接、问题单、内部issue等)

【修改方案】

请描述修改内容的具体实现,涉及哪些组件之间进行交互,可以用1、2、3、...进行罗列
如果是需求或者重构类的PR,需要补充详细设计文档(说明上下游组件关系、时序图、类图、DFX能力等内容)

functorch用例问题,阻塞合入,先行跳过,issue跟踪

【资料变更】

请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及”

【接口变更】

请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及”

【功能验证】

说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤
新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图

【CheckList】

PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x]

likedislike
Pull Request已成功合入, 合并人@ascend-robot
(感谢 SCh_zx 的贡献)
SSCh_zx成员
6月23日 创建了 pull request,commit 2ef03f04
ascend-robotascend-robot成员
6月23日 添加了label:ascend-cla/yes
ascend-robot
ascend-robot成员
6月23日 评论:

CLA Signature Pass

SCh_zx, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
ascend-robotascend-robot成员
6月23日 添加了label:needs-issue
ascend-robot
ascend-robot成员
6月23日 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here
You can get sig-info at here


PR Approval Progress

Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
test liangsongwei, ffmh (2/2) liangsongwei (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)
likedislike
ascend-robot
ascend-robot成员
6月23日 评论:

Linking Issue Notice

@SCh_zx , the pull request must be linked to at least one issue.
If an issue has already been linked, but the needs-issue label remains, you can remove the label by commenting /check-issue .

likedislike
ascend-robot
ascend-robot成员
6月23日 评论:

当前仓库存在以下 保护分支

Protected Branch Version Release
master
v2.7.1
v2.12.0
v2.11.0
v2.10.0
v2.9.0
v2.12.0-26.1.0
v2.11.0-26.1.0
v2.10.0-26.1.0
v2.9.0-26.1.0
v2.7.1-26.1.0
ci-test
sync-pr28113--to-v2.9.0

评论 /sync <branch1> <branch2> ... 可将当前 PR 修改同步到其它分支(创建同步 PR):
a) 如果当前 PR 是 Open 状态,同步操作将延迟到 PR 被合并时执行
b) 如果当前 PR 已经 Merged,将立即执行同步操作

注意:

  1. /sync 命令可以指定同步到多个分支,仅最后一个 /sync 命令生效
  2. 如果创建的同步 PR 不正确,可通过向同步 PR 的源分支提交轻量级 PR 完善,或使用 /close 命令关闭
likedislike
SCh_zx成员
6月23日 评论:

compile

likedislike
ascend-robotascend-robot成员
6月23日 添加了label:ci-pipeline-running
ascend-robot
ascend-robot成员
6月23日 评论:

Ascend docs pipeline is running...

likedislike
ascend-robotascend-robot成员
6月23日 添加了label:docs-ci-pipeline-running
ascend-robot
ascend-robot成员
6月23日 评论:

Ascend docs pipeline is running...

likedislike
ascend-robot
ascend-robot成员
6月23日 评论:

✅ 跳过 docs ci 检查,没有需要检查的文档文件

likedislike
ascend-robotascend-robot成员
6月23日 删除了label:docs-ci-pipeline-running
ascend-robotascend-robot成员
6月23日 添加了label:docs-ci-pipeline-success
ascend-robot
ascend-robot成员
6月23日 评论:

✅ 跳过 docs ci 检查,没有需要检查的文档文件

likedislike
atomgit-bot
atomgit-bot
6月23日 评论:

变更摘要

该 PR 主要对 test/functorch/test_eager_transforms.py 测试文件进行了两处修改:为文件添加了 Facebook/BSD 风格版权声明头部,并在 TestHessian 测试类中对 test_jacfwd_different_levels 测试方法添加了无条件跳过装饰器,以避免 CI 中 jacfwd 相关的错误。

主要改动

  • 添加版权声明头部: 在文件开头新增了 Facebook, Inc. 的 BSD-style 许可证版权声明(第 2–6 行),与 PyTorch 项目的标准文件头部保持一致。
  • 跳过 test_jacfwd_different_levels 测试: 在 TestHessian 类的 test_jacfwd_different_levels 方法上添加了 @unittest.skip("skip ci err jacfwd") 装饰器(第 2482 行),使该测试在所有环境下均被跳过,不再参与 CI 执行。
likedislike
atomgit-bot
atomgit-bot
6月23日 评论:

代码审查

总结

  • 已审查文件: 1 — test/functorch/test_eager_transforms.py(已审查)
  • P0: 0
  • P1: 0
  • P2: 0
  • P3: 1(skip 消息过于模糊,缺少问题追踪引用)

整体风险评估: 此变更风险较低。新增的 Facebook 版权声明头是标准的样板文本,无问题。@unittest.skip 装饰器在功能上正确——它会按预期跳过测试。唯一的顾虑是 skip 原因消息过于模糊("skip ci err jacfwd"),不符合该代码库中提供信息丰富、可操作的 skip 消息的惯例;同时消息中引用 "jacfwd" 与被跳过测试的实际体(使用 jacrev)之间存在差异,可能表明 skip 被应用到了错误的测试上。

类型 数量
🔴 阻塞 0
🟡 建议 1

💬 仅评论

likedislike
atomgit-bot
atomgit-bot6月23日进行代码检视1
test/functorch/test_eager_transforms.py
@@ -1,12 +1,13 @@
11# Owner(s): ["module: functorch"]
2+# Copyright (c) Facebook, Inc. and its affiliates.
3+# All rights reserved.
4+#
5+# This source code is licensed under the BSD-style license found in the
6+# LICENSE file in the root directory of this source tree.
27 
38import copy
49import math
@@ -2474,6 +2479,7 @@ class TestHessian(TestCase):
24742479 y = torch.randn(3, device=device)
24752480 self._test_against_reference(f, (x, y))
24762481 
2482+ @unittest.skip("skip ci err jacfwd")
atomgit-bot
atomgit-bot6月23日评论:

🔵 Low Priority

新增的 @unittest.skip("skip ci err jacfwd") 装饰器的 skip 原因字符串过于模糊。与该文件中其他 skip 的惯例(例如 "fails in Windows; needs investigation""see pytorch torchdynamo issue 103613"# pytorch issues 86798)相比,"skip ci err jacfwd" 没有说明具体的失败模式、没有引用追踪 issue 编号,也没有说明在什么条件下可以重新启用该测试。这会导致后续维护者无法判断该 skip 是否仍然必要、底层问题是否已修复。

此外,测试方法名为 test_jacfwd_different_levels,但测试体实际使用的是 jacrev(jacrev(loss)),而非 jacfwd。skip 消息中的 "jacfwd" 指向的是测试名称而非测试体实际内容,这可能意味着 skip 被加到了错误的测试上——即原本要跳过的是一个实际使用 jacfwd 的测试,但由于名称误导,skip 被放到了这个使用 jacrev 的测试上。这会不必要地降低 hessian/jacrev 组合正确性的测试覆盖率。

建议:将 skip 消息更新为更具信息量的描述,至少应包含:(1) 引用具体的 issue 追踪编号,(2) 简要描述失败原因或错误信息。同时请确认该 skip 应当放在此测试(测试体使用 jacrev 而非 jacfwd)上,而不是其他实际使用 jacfwd 的测试上。

likedislike
ascend-robotascend-robot成员
6月23日 删除了label:ci-pipeline-running
ascend-robotascend-robot成员
6月23日 添加了label:ci-pipeline-passed
ascend-robot
ascend-robot成员
6月23日 评论:
流水线 PR-pipeline_pytorch#38378 已完成
阶段 任务名 状态 详情
编译构建 Build_X86 >>>
Build_ARM >>>
Build_LibTorch_x86 >>>
Build_LibTorch_ARM >>>
Build_X86_torchair 🛑 >>>
Build_ARM_torchair 🛑 >>>
patch_test 🛑 >>>
恶意代码检查 Antipoison >>>
编码安全与规范检查 CodeCheck >>>
check_error >>>
CodeCheck_lintrunner >>>
开源片段检查 SCA >>>
开发者测试 UT_X86_Part_01 🛑 >>>
UT_X86_Part_02 🛑 >>>
UT_ARM_A3_Part_01 🛑 >>>
UT_ARM_A3_Part_02 🛑 >>>
UT_ARM_A2_Part_01 >>>
UT_ARM_A2_Part_02 >>>
UT_ARM_A2_Part_03 >>>
UT_inductor_Part_01 🛑 >>>
UT_inductor_Part_02 🛑 >>>
UT_inductor_Part_03 🛑 >>>
UT_inductor_Part_04 🛑 >>>
UT_DIST_ARM_Part_01 🛑 >>>
UT_DIST_ARM_Part_02 🛑 >>>
UT_DIST_ARM_Part_03 🛑 >>>
UT_DIST_ARM_Part_04 🛑 >>>
UT_ARM_A2_Select_Part_01 >>>
UT_ARM_A2_Select_Part_02 >>>
流水线 PR-pipeline_pytorch >>>
likedislike
SSCh_zx成员
6月23日 关联了issue:[Bug]: skip ci error test_eager_transforms
此处折叠了7条事件消息 查看更多
SSCh_zx成员
6月23日 修改了pull request 的描述
梁松伟
梁松伟成员
6月23日 评论:

/approve

likedislike
ascend-robotascend-robot成员
6月23日 添加了label:approved
ffmh
ffmh成员
6月23日 评论:

/lgtm

likedislike
ascend-robotascend-robot成员
6月23日 添加了label:lgtm
ascend-robot
ascend-robot成员
6月23日 评论:

The MR can not be merged, because of CodeReview discussion not resolved

If you want to solve this problem, you can click here to do it in the FAQs.

likedislike
ffmhffmh成员
6月23日 解决了最后一个问题
SCh_zx成员
6月24日 评论:

/check-pr

likedislike
ascend-robotascend-robot成员
6月24日 关闭了关联的issue
ascend-robotascend-robot成员
6月24日 合入了pull request
ascend-robot
ascend-robot成员
6月24日 评论:

Pull Request 已合并或已关闭。

If you want to solve this problem, you can click here to do it in the FAQs.

likedislike
ascend-robot
ascend-robot成员
6月24日 评论:
流水线 pytorch_gitcode_PR_multiVersion#11207 [ commitID:7d860058 ] 已完成
likedislike
SCh_zx成员
6月25日 评论:

/sync v2.10.0-26.1.0

likedislike
ascend-robot
ascend-robot成员
6月25日 评论:

In response to this:

/sync v2.10.0-26.1.0

@SCh_zx

同步操作执行结果:

Branch Status Pull Request
v2.10.0-26.1.0 创建同步 PR https://gitcode.com/Ascend/pytorch/merge_requests/39334
likedislike
ascend-robotascend-robot成员
6月27日 added a commit that referenced this pull request
  • 08471d91 - [sync] PR-39004: [test]skip_test_jacfwd Co-authored-by: SCh-zx<1325467101@qq.com> # message auto-generated for no-merge-commit merge: !39334 merge sync-pr39004-v2.10.0-to-v2.10.0-26.1.0 into v2.10.0-26.1.0 [sync] PR-39004: [test]skip_test_jacfwd Created-by: ascend-ds-bot Commit-by: SCh-zx Merged-by: ascend-robot Description: ### 1. Origin pull request: https://gitcode.com/Ascend/pytorch/merge_requests/39004 ### 2. Original pull request related issue(s): https://gitcode.com/Ascend/pytorch/issues/2451 ### 3. Original pull request related commit(s): | Sha | Datetime | Message | |---|---|---| |[7d860058](https://gitcode.com/Ascend/pytorch/commit/7d860058cfc36edf059845d562717854122aa575)|2026-06-23 09:29:33 +0800 CST|skip_test_jacfwd
    | See merge request: Ascend/pytorch!39334
    • [#39004](https://gitcode.com/Ascend/pytorch/merge_requests/39004)
[Compare with previous version](https://gitcode.com/Ascend/pytorch/merge_requests/39004/diffs?diff_id=6533060&start_sha=edc2547840a0ac2992d81172319a3a3184720777