Configures SwanLab experiment tracking credentials and login via environment variables, config files, or interactive prompts. Supports container setup and connection checks.
Ships in external-gitcode-ascend-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
# source 共享函数库
source scripts/functions.sh
# 在当前环境配置 SwanLab
swanlab_setup
# 为指定容器配置
swanlab_setup_for_container my_container
# 检查连接状态
swanlab_check
环境变量 > 配置文件 > 交互式输入
| 方式 | 变量/路径 | 说明 |
|---|---|---|
| 环境变量 | SWANLAB_HOST, SWANLAB_API_KEY | 推荐方式 |
| 配置文件 | ~/.verl/swanlab.conf | 首次交互后自动保存 |
| 交互式输入 | 终端提示 | 仅在交互式终端下触发 |
脚本 scripts/functions.sh 提供 sourceable 函数:
| 函数 | 用途 |
|---|---|
swanlab_clear_proxy | 清除代理设置(SwanLab 连接需要) |
swanlab_load_config | 加载配置(环境变量 > 文件) |
swanlab_save_config HOST KEY | 保存配置到 ~/.verl/swanlab.conf |
swanlab_prompt_config | 交互式获取配置 |
swanlab_init | 按优先级初始化配置 |
swanlab_login | 在当前环境执行 pip install + swanlab login |
swanlab_setup | 完整流程:clear_proxy + init + login |
swanlab_setup_for_container NAME | 在指定容器内执行 swanlab_setup |
swanlab_check | 检查登录状态和网络连通性 |
# 1. 发现 skill 路径(推荐通过环境变量)
SWANLAB_SETUP_PATH="${SWANLAB_SETUP_PATH:-$(dirname "$(find ~/.claude/skills/swanlab-setup -name functions.sh 2>/dev/null || echo "")")}"
# 2. source 函数库
source "$SWANLAB_SETUP_PATH/scripts/functions.sh"
# 3. 调用
swanlab_setup
swanlab-setup/
├── SKILL.md # 本文档
└── scripts/
├── functions.sh # 共享函数库(被其他 skill source)
└── swanlab_check.sh # 独立检查脚本
What SKILL.md sets; muted values are Claude Code's defaults
/external-gitcode-ascend-skills:external-gitcode-ascend-swanlab-setupfrom external-gitcode-ascend-skills
npx claudepluginhub ascend-ai-coding/awesome-ascend-skills --plugin external-gitcode-ascend-skills91 skills in this plugin
/external-gitcode-ascend-analyse-coverage分析测试覆盖率盲区,生成覆盖率分析报告/external-gitcode-ascend-arxiv-recommendation-npu自动化推荐系统论文发现流水线。抓取 arxiv 推荐论文,检测源码,生成待迁移任务清单,由 npu-model-migration skill 完成 NPU 适配。/external-gitcode-ascend-ascendc-operator-code-gen根据设计文档生成 AscendC 算子完整代码实现并完成框架适配。TRIGGER when: 设计文档已完成,需要生成 op_host/op_kernel 代码、注册到 PyTorch 框架、编译测试。关键词:代码生成、op_host、op_kernel、tiling、kernel、框架适配、算子注册。Other plugins' skills for the same job