Skip to content

[feature] 迁移 axolotl Quick Start 并接入看护 - #149

Merged
hipudding merged 3 commits into
Ascend:mainfrom
licy666:feat/axolotl-quick-start
Sep 21, 2026
Merged

hipudding merged 3 commits into
Ascend:mainfrom
licy666:feat/axolotl-quick-start

Conversation

@licy666

@licy666 licy666 commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

axolotl 的昇腾 Quick Start 从 cosdt-ci-test/workflows 迁进本仓,接到已有的 quick-start-template.yml

Summary

  • 迁移 axolotl Quick Start,并接到本仓看护引擎。
  • 按评审改安装路径:可见命令装官方当前推荐的 torch / torch_npu,不再写死版本;用 --no-build-isolation 装 axolotl,不再手抄依赖。
  • 去掉可见的 PYTHONNOUSERSITE 和「必须先是 Python 3.12」门槛。
  • 训练配置加 seed: 42。看护钉第一步 loss12.49,后几步只比对 loss / train_loss 字段。
  • 读者只看到把模型下载到工作目录;看护用隐藏 #test-setup 命中 runner 的 /root/.cache/huggingface,页面上看不到缓存命令。

Test plan

  • 静态检查器对 sources/axolotl/quick_start.md 报 ok
  • 剥掉 HTML 注释后的可见正文无 /root/.cache
  • PR 上的 axolotl-quick-start job 绿:npu_available True"device": "npu:0"、第一步 {'loss': '12.49'Training completed!
  • 热缓存时 download-model 应在数秒内结束,模型来自 /root/.cache/huggingface/hub

@ascend-robot

Copy link
Copy Markdown

CLA Signature Pass

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

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

📖 文档预览已随本 PR 关闭而清理。

github-actions Bot pushed a commit that referenced this pull request Sep 7, 2026
Comment thread sources/axolotl/quick_start.md Outdated
export PYTHONNOUSERSITE=1
```

`PYTHONNOUSERSITE=1` 令 Python 忽略用户目录中的包,避免旧版 CANN 相关包干扰依赖解析。

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个环境变量是必须的么? 按道理说我们认为当前环境没有干扰的包

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已删。入门页按干净环境写,可见路径和测试里都不再设 PYTHONNOUSERSITE。

Comment thread sources/axolotl/quick_start.md Outdated
输出结果如下:

```shell #test-result id="check-py" fuzzy="xxx"
Python 3.12.xxx

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是否有必要先定python版本?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已改。软件表不再写死 3.12,只要求落在官方配套表范围内并满足 axolotl 下限;可见的 check-py 整段已删。

Comment thread sources/axolotl/quick_start.md Outdated

## 3. 安装 PyTorch NPU 栈

从华为 PyPI 额外索引安装与 CANN 9.1.0 匹配的 `torch==2.11.0` / `torch_npu==2.11.0`,并一并装上 `numpy`、`pyyaml`。版本行出现 `2.11.0+cpu` 属正常,`npu_available` 须为 `True`。

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议就安装torch_npu和cann的优选版本,可以给一个链接,这样可以避免文档中写死版本号,避免要经常更新

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已改。可见命令只装官方当前推荐的 torch_npu,主索引走 CPU 轮子源,不再写死版本。配套链接见软件表。

Comment thread sources/axolotl/quick_start.md Outdated

```shell #test id="install-axolotl" load="axolotl_ver>>ver"
python -m pip install --no-build-isolation --no-deps "axolotl==<ver>"
python -m pip install \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这是为什么要手动安装依赖包呢? requirement.txt不行么

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已改。上游声明在 pyproject.toml。先装好 NPU 栈,再 pip install --no-build-isolation axolotl,不再手抄 pin。

@ascend-robot

Copy link
Copy Markdown

CLA Signature Pass

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

@ascend-robot

Copy link
Copy Markdown

CLA Signature Pass

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

@ascend-robot

Copy link
Copy Markdown

CLA Signature Pass

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

把 axolotl 从 workflows 源仓迁到本仓共享引擎:可见下载改 Hugging Face,
薄触发器不传 --volume,着陆页只 include 以免侧栏出现「快速开始」夹层。
可见路径不再写死 torch/Python,也不再手抄依赖。seed: 42 下第一步 loss 钉 12.49,后几步只比对字段。
可见块只写工作目录下载;看护用隐藏 #test-setup 命中 /root/.cache/huggingface。
@ascend-robot

Copy link
Copy Markdown

CLA Signature Pass

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

@hipudding
hipudding merged commit 11dbbaa into Ascend:main Sep 21, 2026
5 checks passed
github-actions Bot added a commit that referenced this pull request Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants