external-gitcode-ascend-model-migration
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "external-gitcode-ascend-model-migration":https://skillpi.com/zh/skills/deepskill-397d61bfdb7e0d87898673d0abc9cc667fd2b20a8039083fd3938501de51e37a。安装前核对上游来源和版本:https://github.com/ascend-ai-coding/awesome-ascend-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
为昇腾 NPU 进行模型代码迁移的技能。当用户需要克隆模型代码以适配昇腾 NPU 时调用。
介绍来源: third_party · ascend-ai-coding · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 软件、账号及付费要求
- 贝什
- 实测状态
- 未测试
文件浏览
Frontmatter
name: external-gitcode-ascend-model-migration
description: Model code migration for Ascend NPU. Invoke when user needs to clone
open-source repo and apply NPU adaptation patches.
original-name: model-migration
synced-from: https://gitcode.com/Ascend/agent-skills
synced-date: '2026-05-26'
synced-commit: 1f7666e7768a0ceb21bb1d40ce4b5179fcb6f1d6
license: UNKNOWNModel Migration Skill
Clone open-source model repositories and apply NPU adaptation patches for Ascend NPU training.
When to Invoke
- User wants to migrate open-source model to Ascend NPU
- User needs to clone model repository
- User needs to apply DrivingSDK patches
- User asks about preparing model code for NPU training
Information to Collect
Ask user for the following:
1. Model name (e.g., BEVFormer)
2. Working directory path on server
3. Dataset path (if already prepared)
4. Pre-trained weights path (if available)
重要:DrivingSDK仓库地址为 https://gitcode.com/Ascend/DrivingSDK,包含所有必要的patch文件和训练脚本。
Workflow
Step 1: Clone Repository in DrivingSDK model_examples Directory
重要:必须在 DrivingSDK/model_examples/<model_name>/ 目录下克隆模型仓库,而不是在外部创建新目录。
# 进入DrivingSDK的model_examples目录
cd <DrivingSDK_path>/model_examples/BEVFormer
# 克隆模型仓库(会在当前目录下创建BEVFormer子目录)
git clone https://github.com/fundamentalvision/BEVFormer.git
Step 2: Copy Patch to Model Directory
# 将patch文件复制到克隆的模型目录中
cp bev_former_config.patch BEVFormer/
Step 3: Checkout Specific Commit
cd BEVFormer
git checkout 66b65f3a1f58caf0507cb2a971b9c0e7f842376c
Step 4: Apply NPU Patches
# 在模型目录内应用patch
git apply --reject --whitespace=fix bev_former_config.patch
Step 5: Setup Dataset and Weight Links
# 创建数据和权重目录
mkdir -p data ckpts
# 设置数据集软链接
ln -sf <dataset_path>/nuscenes data/nuscenes
ln -sf <dataset_path>/can_bus data/can_bus
# 设置预训练权重软链接
ln -sf <weight_path>/r101_dcn_fcos3d_pretrain.pth ckpts/
Step 6: Return to Parent Directory for Training
# 返回到model_examples/BEVFormer目录
cd ..
# 执行训练脚本
bash test/train_performance_8p_base_fp32.sh --batch-size=1 --num-npu=8
Supported Models
BEVFormer
Repository: https://github.com/fundamentalvision/BEVFormer.git
Commit: 66b65f3a1f58caf0507cb2a971b9c0e7f842376c
Patch: bev_former_config.patch
Dataset Required:
- nuscenes (processed)
- can_bus
Weights Required:
r101_dcn_fcos3d_pretrain.pth
Commands:
# 进入DrivingSDK的model_examples/BEVFormer目录
cd <DrivingSDK_path>/model_examples/BEVFormer
# 克隆BEVFormer仓库
git clone https://github.com/fundamentalvision/BEVFormer.git
# 复制patch到BEVFormer目录
cp bev_former_config.patch BEVFormer/
# 进入BEVFormer目录
cd BEVFormer
# 切换到指定commit
git checkout 66b65f3a1f58caf0507cb2a971b9c0e7f842376c
# 应用patch
git apply --reject --whitespace=fix bev_former_config.patch
# 创建数据和权重目录
mkdir -p data ckpts
# 设置数据集软链接
ln -sf <dataset_path>/nuscenes data/nuscenes
ln -sf <dataset_path>/can_bus data/can_bus
# 设置预训练权重软链接
ln -sf <weight_path>/r101_dcn_fcos3d_pretrain.pth ckpts/
# 返回上级目录执行训练
cd ..
bash test/train_performance_8p_base_fp32.sh --batch-size=1 --num-npu=8
Network Strategy
| Situation | Strategy |
|---|---|
| Server can access GitHub | Direct git clone on server |
| Server network timeout | Configure proxy or clone locally → scp to server |
| Proxy available | Configure proxy: export http_proxy=http://proxy:port |
重要:所有GitHub仓库克隆都应使用GitHub官方链接,不使用镜像站点。如果网络超时,优先配置代理。
Local Clone + SCP Transfer
If server cannot access GitHub:
# On local machine
git clone https://github.com/fundamentalvision/BEVFormer.git
cd BEVFormer
git checkout 66b65f3a1f58caf0507cb2a971b9c0e7f842376c
# Transfer to server
scp -r BEVFormer <user>@<server>:<working_directory>/
Verification
After migration, verify setup:
# Check directory structure
ls -la <model_directory>/
# Check patch applied
cd <model_directory> && git status
# Check data links
ls -la data/
ls -la ckpts/
Troubleshooting
Patch Application Fails
- Check if correct commit is checked out
- Check for
.rejfiles for manual merge - Verify patch file is for correct model version
Dataset Not Found
- Verify dataset path exists
- Check symbolic link is correct
- Ask user for correct dataset path
Weights Not Found
- Verify weight file exists
- Check weight file name matches config
- Ask user for correct weight path
Reference
- DrivingSDK model examples:
DrivingSDK/model_examples/ - Model-specific README:
DrivingSDK/model_examples/<model>/README.md
当前收录版本
0.0.1
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 为昇腾NPU用户提供专业的模型代码迁移解决方案
- 解决开源模型适配NPU硬件的核心痛点
- 支持BEVFormer等主流模型的完整迁移流程
亮点
- 触发场景描述清晰完整
- When to Invoke章节覆盖多种用户意图
- description准确描述核心功能
待提升项
-
缺少错误处理门控说明 原报告严重程度:轻微
Workflow中未明确说明各步骤失败时的处理门控
改进建议:在各步骤中添加前置条件检查和失败处理说明
亮点
- Phase划分清晰,Step 1-6流程完整
- 包含端到端BEVFormer示例
- frontmatter信息完整
待提升项
-
缺少DrivingSDK路径存在性检查 原报告严重程度:轻微
未在第一步验证DrivingSDK路径是否存在
改进建议:在Step 1前添加路径存在性验证和错误提示
亮点
- 工具来源明确,使用标准git命令
- 参数具体准确,包含commit hash和patch文件
- Troubleshooting章节覆盖主要异常场景
- git apply使用--reject参数处理冲突
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
-
调用命令或脚本
先读脚本与参数,使用普通权限和限定目录;安装或执行前由使用工具再次确认。
主文档提及 · 第 92, 144 行
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- gitcode.com
- github.com
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
贝什
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。