已合并
test(distributed): add test for EtcdStore APIs for v2.12.0 #35276
zf_zhang创建于 5月11日
test(distributed): add test for EtcdStore APIs for v2.12.0 #35276
已合并
Pull Request已成功合入, 合并人@ascend-robot
(感谢 zf_zhang 的贡献)5月11日 关联了issue:[Usage]: torch.distributed.elastic.rendezvous.etcd_store.EtcdStore等API无专门用例
ascend-robot
5月11日 评论:
5月11日 评论:
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 | ✅ 李伟, sunyu-xuan (2/2) | ✅ 李伟 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
zf_zhang, thanks for your pull request. All authors of the commits have signed the CLA. 👍


ascend-robot
5月11日 评论:
5月11日 评论:
5月11日 添加了label:ascend-cla/yes
此处折叠了90条消息 查看更多
sunyu-xuan
5月21日 评论:
5月21日 评论:
/lgtm


5月21日 添加了label:approvedlgtm
ascend-robot
5月21日 评论:
5月21日 评论:
Review Guide
This pull-request passes review.
Committers who wrote a comment of /approve are: 李伟.
Reviewers who wrote a comment of /lgtm are: sunyu-xuan, 李伟.


5月21日 合入了pull request
【合入来源】
【修改方案】
用例设计原则
本次验证结合官方用例复用与自定义用例补充的方式,遵循 “最小化、核心化、针对性” 原则,核心思路为:
【资料变更】
不涉及
【接口变更】
不涉及
【功能验证】
torch.distributed.elastic.rendezvous.etcd_store.EtcdStore: 我们围绕EtcdStore的连接可靠性、前缀规范化及超时机制,设计了基于真实 etcd 环境的初始化与行为一致性测试用例。
torch.distributed.elastic.rendezvous.etcd_store.EtcdStore.set 和 torch.distributed.elastic.rendezvous.etcd_store.EtcdStore.get: 我们围绕EtcdStore对不同数据类型的兼容性、覆写语义、异常处理、特殊字符支持及阻塞/超时行为,设计了全面验证 set/get 正确性与并发语义的测试用例。
torch.distributed.elastic.rendezvous.etcd_store.EtcdStore.add: 我们围绕EtcdStore.add的初始化与累加语义、相减与幂等性、以及高并发场景下的原子性与一致性,设计了覆盖功能正确性与并发安全性的 add 测试用例。
torch.distributed.elastic.rendezvous.etcd_store.EtcdStore.wait: 我们针对 EtcdStore.wait,设计了多线程延迟写入验证正常阻塞返回、全局与覆盖超时触发异常、以及部分 key 存在时超时失败的测试用例。
torch.distributed.elastic.rendezvous.etcd_store.EtcdStore.check: 我们针对 EtcdStore.check,设计了覆盖key的全部存在、部分存在、全部不存在、空列表边界及单个key 场景的非阻塞检查行为测试用例。
torch.distributed.elastic.rendezvous.etcd_store.EtcdStore.check: 我们针对 EtcdStore.set_timeout,设计了验证默认超时生效、零超时立即返回以及对 get 和 wait 行为产生影响的测试用例。
此外,我们还针对 EtcdStore 集成场景,设计了多节点并发 rendezvous 协调流程与高并发混合操作压力测试,验证其同步一致性与稳定性。
用例合理性说明:自定义用例虽简洁,但具备充分有效性与合理性。
自定义用例精准补全:EtcdStore自定义用例聚焦无官方用例覆盖的所有核心功能,贴合实际业务使用方式,验证结果具备业务参考价值;
适配操作最小化:只对EtcdStore类的核心功能进行验证。
符合官方规范:自定义用例基于 PyTorch 官方测试框架开发,使用原生断言方法,与官方用例测试标准保持一致;

【CheckList】