SuperAPI AI 工具集

cicd

部署与运维

查看项目

更新于 10-16 02:34

技能介绍

用途:为 Megatron-LM 仓库提供 CI/CD 参考,帮助理解流水线结构、选择 PR 测试标签、触发内部 GitLab CI 并排查失败。

主要能力:主工作流为 .github/workflows/cicd-main.yml,触发条件包括推送到 pull-request/[0-9]+ 与 deploy-release/* 分支、merge group、每日定时和手动触发。流水线依次经过 is-not-external-contributor、pre-flight、configure(决定 scope、容器标签、n_repeat),再并行执行 linting、cicd-container-build(含单元测试与 H100/GB200 集成测试解析)以及最终门禁 Nemo_CICD_Test。镜像推送到 AWS ECR 与 GCP Artifact Registry。

使用方式:CI 读取 PR 标签决定测试范围。merge group 自动使用 mr-github、n_repeat=1;标签 Run tests 为 mr-github、n_repeat=1、lightweight=true;Run functional tests 为 mr-github、n_repeat=5;无标签则 mr-github-slim、n_repeat=5。container::lts 可叠加使用 LTS 基础镜像,Run MBridge tests 额外触发 MBridge L1 测试。文档给出按改动类型选择标签的对照表,并建议默认使用 Run tests,新增测试用例或可能影响 loss 曲线时用 Run functional tests。触发内部 CI 需先添加 GitLab remote 并设置 GITLAB_TOKEN,再运行 python tools/trigger_internal_ci.py --gitlab-origin gitlab [--functional-test-scope mr] [--functional-test-repeat 5] [--functional-test-cases all] [--dry-run]。

失败排查:CI 分支遵循 pull-request/<number>,可用 gh pr view、gh pr diff、gh run list、gh run view --log-failed 定位;完整 per-rank 日志以 logs-<test_case>-<run_id>-<uuid> 工件上传,需下载后分块查看,避免一次读取超长日志。

限制:GB200 集成测试仅维护者可运行;部分设置与内部 GitLab 环境相关,具体主机名等细节暂未提供。