已开启
docs: configure sample imports for the root-level FlashKDA example #137
docs: configure sample imports for the root-level FlashKDA example #137
已开启
tianjun创建于 6 天前
tianjun
6 天前

描述

FlashKDA README明确要求在仓库根目录运行,但示例导入flash_kda.flash_kda及flash_kda.flash_kda_metadata;这两个模块实际位于samples/flash_kda下,根目录不存在flash_kda包。普通Python解释器不会执行pytest conftest中加入samples的逻辑,按专用README复制示例会先遇到ModuleNotFoundError。

在根目录示例之前明确将$(pwd)/samples加入PYTHONPATH,保留用户原有搜索路径,与两个分层导入及测试conftest的路径设置一致。

类型

如何测试

用标准库PathFinder静态解析实际仓库:仅根目录搜索不到flash_kda,添加samples后两个子模块都解析到实际.py文件;新增export命令bash -n通过。不加载DSL/torch_npu或执行kernel。 仓库适用 pre-commit hooks 与 diff --check 通过。

本地无 NPU,未执行训练或硬件测试;提交后使用 /compile 触发仓库 CI。

Checklist:

其他信息

Fixes #27

基于 e5f66414a59883500e115d621b7317acf4b3dd6c,PR 保留一个提交。

AI 参与

使用 OpenAI Codex(GPT-6 系列)审查代码与文档,在 Host 侧复现、核对已有报告并准备修复。提交者账号为 Ethan_Zou。

likedislike
合并受阻
Ttianjun
6 天前 创建了 pull request,commit 928f1572
Ttianjun
6 天前 关联了issue:[Docs] FlashKDA根目录快速开始没有配置samples路径,无法找到导入模块
tianjun
6 天前 评论:

/compile

likedislike
Ttianjun
6 天前 预合并成功(commit_id: 1ed07d2a63abce064af86169d5cf2638acccf556)
CANN-robotCANN-robot成员
6 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
6 天前 评论:

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

⚠️ This PR does not yet meet the following requirements:lgtm (requires ≥ 2 person(s) per module)、approve (requires ≥ 1 person(s) per module)

Module Approval Details

module lgtm status approve status
repo-cann/cannbot-dsl ❌ (0/2)(You can also ask: 金炯, 刘佳玮, liujun2025, yang-jiwei, 陈振宇) ❌ (0/1)(You can also ask: 沈敏, 陆玲辉, 金炯, 陈振宇, 刘佳玮)

💡 Tip:

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

CLA Signature Pass

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

likedislike
CANN-robot
CANN-robot成员
6 天前 评论:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robot成员
6 天前 添加了label:ci-pipeline-running
CANN-robotCANN-robot成员
6 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
6 天前 添加了label:ci-pipeline-failed