已合并
Sync PyPTO Pro API annotations and docs #6873
Sync PyPTO Pro API annotations and docs #6873
已合并
xuxinlei321创建于 9 天前
xuxinlei321
9 天前

PR 应该避免没有描述信息,描述信息的最重要的作用是描述修改意图,应该清晰明了。例如:标题中包含了 fix 标签,如果没有描述信息,就需要Review人员猜测PR具体修复了哪些内容,或者怀疑修改的必要性。如果PR和特定的Issue相关,可以单独包含一行 Related Issue: 放到描述信息最后。

下面是一个典型的PR描述信息:

The origin issue template brings too many noise, it's not suitable for git message. eg: comments
are not removed, labels are redundant as the PR tile already contains the tag.

The guide gives a clear suggestion on how to write the PR body.

Related Issue: #1234,#5678

更多描述信息见:Commit Message 规范

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 xuxinlei321 的贡献)
Xxuxinlei321
9 天前 创建了 pull request,commit 8f2441b5
atomgit-bot
atomgit-bot
9 天前 评论:

变更摘要

本 PR 主要对 PyPTO Pro 的语言层 API 声明与文档进行同步整理,核心是统一并内联类型标注:移除 _api.py 中的 Offset、Shape 类型别名,改为在各接口签名中直接使用 Union[List[int], int]、List[int]、Sequence[int] 等显式类型;同时将 TileType 构造函数的返回值标注为具体的 TileTypeDescriptor。相应的参数类型校验与错误信息测试也同步调整,以保证声明、校验和报错保持一致。

主要改动

  • 移除类型别名 Offset 与 Shape: 在 _api.py 中删除 Offset = Union[List[int], int] 与 Shape = List[int],接口签名改为内联显式类型。
  • IO/搬运类接口参数类型内联: load、load_tile、store、store_tile 的 offsets/tile_offsets 及 move 的 offset 改为 Union[List[int], int] 或 Optional[Union[List[int], int]]。
  • TileType 构造函数返回与形状参数调整: 引入 TileType as TileTypeDescriptor 别名,TileType 返回值由 Any 改为 TileTypeDescriptor,shape/valid_shape 改为 Sequence[int]。
  • 其余接口与元数据接口改用显式类型: set_validshape、reinterpret、dump_data、make_tensor 的 shape/stride/shapes 改用 List[int],并为 reinterpret 的 dtype、shape 增加 Optional 标注。
  • 校验表与错误信息同步: _argument_checker.py 从 _LEAF_TYPES 中移除 Shape、Offset 条目并更新注释,test_error_format.py 中断言更新为 pl.TileType: shape expects Sequence[int], got int。
likedislike
不准确?
atomgit-bot
atomgit-bot
9 天前 评论:

代码审查

✅ 未发现问题

likedislike
不准确?
CANN-robotCANN-robot成员
9 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
9 天前 评论:

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.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.


PR Approval Progress

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

Module Approval Details

module lgtm status approve status
docs ✅ lyz0328, 尹杰, gaoxiang618 (3/2) ✅ 尹杰, lyz0328 (2/1)
python/pypto_pro ✅ 尹杰, gaoxiang618 (2/2) ✅ gaoxiang618, 尹杰 (2/1)
repo-cann/pypto ✅ gaoxiang618, 尹杰 (2/2) ✅ gaoxiang618, 尹杰 (2/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

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

likedislike
此处折叠了106条消息 查看更多
gaoxiang618成员
6 天前 评论:

/approve
/lgtm

likedislike
CANN-robotCANN-robot成员
6 天前 添加了label:approved
Jie Yin成员
6 天前 评论:

/approve

likedislike
CANN-robotCANN-robot成员
6 天前 添加了label:lgtm
CANN-robotCANN-robot成员
6 天前 合入了pull request