Closed
【docs】完善快速入门的AMP迁移步骤与训练输出说明 #5032
chenrayrayAdd on  Sep 22Closed at  Sep 29
chenrayray
chenrayrayCollaborators
Sep 22 Create

问题描述

快速入门(docs/zh/user_guide/quick_start.md)中GradScaler定义未标记为新增行,训练脚本缺少loss输出。AMP循环分散在删除和添加示例中,容易漏改缩进;数据下载要求、自动迁移后保留cuda:0的原因和本次训练完成的判断也不够清楚。

预期修改

  • 为scaler定义补充diff新增标记,提供可直接替换的AMP训练循环并解释autocast和GradScaler。
  • 每100个batch及每轮最后一个batch打印轮次、步数和loss,保存完成后输出提示,保存轮数引用epochs。
  • 明确导入位置和diff标记含义,说明自动迁移行为,补充MNIST在线及离线准备方法。
  • 环境准备保持简洁,以安装链接为主;保留硬件适用范围说明及文档标记。
  • 提供示意日志,区分流程跑通与模型效果评估。

验收标准

示例Python语法与本地链接检查通过;仅修改快速入门文档,不涉及运行时接口变更。NPU实机训练需另行验证。

likedislike
TorchNPU-BotTorchNPU-BotCollaborators
Sep 22 Added label: triage-reviewmodule: usability
TorchNPU-Bot
TorchNPU-BotCollaborators
Sep 22 Comments:

无报错,属文档改进建议;主题为快速入门文档完善,归属易用性分类
添加分类标签:module: usability。
当前分类由社区bot提供,如分类有误请在评论中回复。

likedislike
chenrayraychenrayrayCollaborators
Sep 22 Associated pull request
TorchNPU-BotTorchNPU-BotCollaborators
Sep 22 Added label: bot-triaged; Removed label: triage-review
TorchNPU-Bot
TorchNPU-BotCollaborators
Sep 22 Comments:

检测到当前 issue 已关联 PR,自动添加标签:bot-triaged

likedislike
chenrayraychenrayrayCollaborators
Sep 23 Associated pull request
chenrayraychenrayrayCollaborators
Sep 23 Associated pull request
chenrayraychenrayrayCollaborators
Sep 23 Associated pull request
chenrayraychenrayrayCollaborators
Sep 24 Associated milestone: v26.2.0
chenrayray
chenrayrayCollaborators
Sep 29 Comments:

因为本单相关实施 PR 已全部结束(4 个已合入、0 个已关闭),按照本轮 issue 整理规则,先关闭此单。

核对的 PR:

如仍有问题或需要继续推进,请重新打开,并补充当前 PyTorch / TorchNPU / CANN 版本、硬件环境、复现步骤及相关日志;需求类请补充尚未完成的具体内容。

likedislike
chenrayraychenrayrayCollaborators
Sep 29 Close issue
chenrayraychenrayrayCollaborators
Sep 29 changed custom state from TODO to DONE
ascend-robotascend-robotCollaborators
Sep 29 Added label: resolved