[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-iterative--cml":3,"tool-iterative--cml":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",138956,2,"2026-04-05T11:33:21",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":79,"owner_location":79,"owner_email":79,"owner_twitter":80,"owner_website":81,"owner_url":82,"languages":83,"stars":96,"forks":97,"last_commit_at":98,"license":99,"difficulty_score":10,"env_os":100,"env_gpu":101,"env_ram":101,"env_deps":102,"category_tags":110,"github_topics":111,"view_count":125,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":126,"updated_at":127,"faqs":128,"releases":157},812,"iterative\u002Fcml","cml","♾️ CML - Continuous Machine Learning | CI\u002FCD for ML","CML（Continuous Machine Learning）是一款面向机器学习运维（MLOps）的开源命令行工具，致力于让机器学习项目也能享受持续集成与交付（CI\u002FCD）带来的便利。它主要解决 ML 实验中模型训练、评估及结果汇报繁琐的问题，避免人工整理指标的低效与误差。\n\nCML 特别适合机器学习工程师、数据科学家以及希望建立标准化 ML 流程的研发团队。其核心亮点在于将 Git 工作流理念引入数据科学，无需部署额外的数据库或服务，直接依托 GitHub、GitLab 等现有平台即可运行。每当发起代码合并请求时，CML 会自动执行模型训练与评估，并在 PR 页面生成包含关键指标和可视化图表的报告。此外，CML 还能与 DVC 无缝配合，帮助团队更好地管理数据与模型版本，让每一次实验变更都清晰可追溯，助力团队做出更明智的数据驱动决策。","\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fiterative_cml_readme_e0cd6b456e04.png\" width=400>\n\u003C\u002Fp>\n\n[![GHA](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Ftag\u002Fiterative\u002Fsetup-cml?label=GitHub%20Actions&logo=GitHub)](https:\u002F\u002Fgithub.com\u002Fiterative\u002Fsetup-cml)\n[![npm](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002F@dvcorg\u002Fcml?logo=npm)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@dvcorg\u002Fcml)\n\n**What is CML?** Continuous Machine Learning (CML) is an open-source CLI tool\nfor implementing continuous integration & delivery (CI\u002FCD) with a focus on\nMLOps. Use it to automate development workflows — including machine\nprovisioning, model training and evaluation, comparing ML experiments across\nproject history, and monitoring changing datasets.\n\nCML can help train and evaluate models — and then generate a visual report with\nresults and metrics — automatically on every pull request.\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fiterative_cml_readme_38f756ea5b75.png) _An\nexample report for a\n[neural style transfer model](https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml_cloud_case)._\n\nCML principles:\n\n- **[GitFlow](https:\u002F\u002Fnvie.com\u002Fposts\u002Fa-successful-git-branching-model) for data\n  science.** Use GitLab or GitHub to manage ML experiments, track who trained ML\n  models or modified data and when. Codify data and models with\n  [DVC](#using-cml-with-dvc) instead of pushing to a Git repo.\n- **Auto reports for ML experiments.** Auto-generate reports with metrics and\n  plots in each Git pull request. Rigorous engineering practices help your team\n  make informed, data-driven decisions.\n- **No additional services.** Build your own ML platform using GitLab,\n  Bitbucket, or GitHub. Optionally, use\n  [cloud storage](#configuring-cloud-storage-providers) as well as either\n  self-hosted or cloud runners (such as AWS EC2 or Azure). No databases,\n  services or complex setup needed.\n\n:question: Need help? Just want to chat about continuous integration for ML?\n[Visit our Discord channel!](https:\u002F\u002Fdiscord.gg\u002FbzA6uY7)\n\n:play_or_pause_button: Check out our\n[YouTube video series](https:\u002F\u002Fwww.youtube.com\u002Fplaylist?list=PL7WG7YrwYcnDBDuCkFbcyjnZQrdskFsBz)\nfor hands-on MLOps tutorials using CML!\n\n## Table of Contents\n\n1. [Setup (GitLab, GitHub, Bitbucket)](#setup)\n2. [Usage](#usage)\n3. [Getting started (tutorial)](#getting-started)\n4. [Using CML with DVC](#using-cml-with-dvc)\n5. [Advanced Setup (Self-hosted, local package)](#advanced-setup)\n6. [Example projects](#see-also)\n\n## Setup\n\nYou'll need a GitLab, GitHub, or Bitbucket account to begin. Users may wish to\nfamiliarize themselves with [Github Actions](https:\u002F\u002Fhelp.github.com\u002Fen\u002Factions)\nor\n[GitLab CI\u002FCD](https:\u002F\u002Fabout.gitlab.com\u002Fstages-devops-lifecycle\u002Fcontinuous-integration).\nHere, will discuss the GitHub use case.\n\n### GitLab\n\nPlease see our docs on\n[CML with GitLab CI\u002FCD](https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fwiki\u002FCML-with-GitLab)\nand in particular the\n[personal access token](https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fwiki\u002FCML-with-GitLab#variables)\nrequirement.\n\n### Bitbucket\n\nPlease see our docs on\n[CML with Bitbucket Cloud](https:\u002F\u002Fcml.dev\u002Fdoc\u002Fusage?tab=Bitbucket).\n\n### GitHub\n\nThe key file in any CML project is `.github\u002Fworkflows\u002Fcml.yaml`:\n\n```yaml\nname: your-workflow-name\non: [push]\njobs:\n  run:\n    runs-on: ubuntu-latest\n    # optionally use a convenient Ubuntu LTS + DVC + CML image\n    # container: ghcr.io\u002Fiterative\u002Fcml:0-dvc2-base1\n    steps:\n      - uses: actions\u002Fcheckout@v3\n      # may need to setup NodeJS & Python3 on e.g. self-hosted\n      # - uses: actions\u002Fsetup-node@v3\n      #   with:\n      #     node-version: '16'\n      # - uses: actions\u002Fsetup-python@v4\n      #   with:\n      #     python-version: '3.x'\n      - uses: iterative\u002Fsetup-cml@v1\n      - name: Train model\n        run: |\n          # Your ML workflow goes here\n          pip install -r requirements.txt\n          python train.py\n      - name: Write CML report\n        env:\n          REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        run: |\n          # Post reports as comments in GitHub PRs\n          cat results.txt >> report.md\n          cml comment create report.md\n```\n\n## Usage\n\nWe helpfully provide CML and other useful libraries pre-installed on our\n[custom Docker images](https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fblob\u002Fmains\u002FDockerfile).\nIn the above example, uncommenting the field\n`container: ghcr.io\u002Fiterative\u002Fcml:0-dvc2-base1`) will make the runner pull the\nCML Docker image. The image already has NodeJS, Python 3, DVC and CML set up on\nan Ubuntu LTS base for convenience.\n\n### CML Functions\n\nCML provides a number of functions to help package the outputs of ML workflows\n(including numeric data and visualizations about model performance) into a CML\nreport.\n\nBelow is a table of CML functions for writing markdown reports and delivering\nthose reports to your CI system.\n\n| Function                  | Description                                                      | Example Inputs                                              |\n| ------------------------- | ---------------------------------------------------------------- | ----------------------------------------------------------- |\n| `cml runner launch`       | Launch a runner locally or hosted by a cloud provider            | See [Arguments](https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml#arguments) |\n| `cml comment create`      | Return CML report as a comment in your GitLab\u002FGitHub workflow    | `\u003Cpath to report> --head-sha \u003Csha>`                         |\n| `cml check create`        | Return CML report as a check in GitHub                           | `\u003Cpath to report> --head-sha \u003Csha>`                         |\n| `cml pr create`           | Commit the given files to a new branch and create a pull request | `\u003Cpath>...`                                                 |\n| `cml tensorboard connect` | Return a link to a Tensorboard.dev page                          | `--logdir \u003Cpath to logs> --title \u003Cexperiment title> --md`   |\n\n#### CML Reports\n\nThe `cml comment create` command can be used to post reports. CML reports are\nwritten in markdown ([GitHub](https:\u002F\u002Fgithub.github.com\u002Fgfm),\n[GitLab](https:\u002F\u002Fdocs.gitlab.com\u002Fee\u002Fuser\u002Fmarkdown.html), or\n[Bitbucket](https:\u002F\u002Fconfluence.atlassian.com\u002Fbitbucketserver\u002Fmarkdown-syntax-guide-776639995.html)\nflavors). That means they can contain images, tables, formatted text, HTML\nblocks, code snippets and more — really, what you put in a CML report is up to\nyou. Some examples:\n\n:spiral_notepad: **Text** Write to your report using whatever method you prefer.\nFor example, copy the contents of a text file containing the results of ML model\ntraining:\n\n```bash\ncat results.txt >> report.md\n```\n\n:framed_picture: **Images** Display images using the markdown or HTML. Note that\nif an image is an output of your ML workflow (i.e., it is produced by your\nworkflow), it can be uploaded and included automaticlly to your CML report. For\nexample, if `graph.png` is output by `python train.py`, run:\n\n```bash\necho \"![](.\u002Fgraph.png)\" >> report.md\ncml comment create report.md\n```\n\n### Getting Started\n\n1. Fork our\n   [example project repository](https:\u002F\u002Fgithub.com\u002Fiterative-test\u002Fcml-example-base).\n\n> :warning: Note that if you are using GitLab,\n> [you will need to create a Personal Access Token](https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fwiki\u002FCML-with-GitLab#variables)\n> for this example to work.\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fiterative_cml_readme_65feb7e230b4.png)\n\n> :warning: The following steps can all be done in the GitHub browser interface.\n> However, to follow along with the commands, we recommend cloning your fork to\n> your local workstation:\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002F\u003Cyour-username>\u002Fexample_cml\n```\n\n2. To create a CML workflow, copy the following into a new file,\n   `.github\u002Fworkflows\u002Fcml.yaml`:\n\n```yaml\nname: model-training\non: [push]\njobs:\n  run:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v3\n      - uses: actions\u002Fsetup-python@v4\n      - uses: iterative\u002Fsetup-cml@v1\n      - name: Train model\n        env:\n          REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        run: |\n          pip install -r requirements.txt\n          python train.py\n\n          cat metrics.txt >> report.md\n          echo \"![](.\u002Fplot.png)\" >> report.md\n          cml comment create report.md\n```\n\n3. In your text editor of choice, edit line 16 of `train.py` to `depth = 5`.\n\n4. Commit and push the changes:\n\n```bash\ngit checkout -b experiment\ngit add . && git commit -m \"modify forest depth\"\ngit push origin experiment\n```\n\n5. In GitHub, open up a pull request to compare the `experiment` branch to\n   `main`.\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fiterative_cml_readme_b04897c65b2e.png)\n\nShortly, you should see a comment from `github-actions` appear in the pull\nrequest with your CML report. This is a result of the `cml send-comment`\nfunction in your workflow.\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fiterative_cml_readme_1bff7ae42328.png)\n\nThis is the outline of the CML workflow:\n\n- you push changes to your GitHub repository,\n- the workflow in your `.github\u002Fworkflows\u002Fcml.yaml` file gets run, and\n- a report is generated and posted to GitHub.\n\nCML functions let you display relevant results from the workflow — such as model\nperformance metrics and visualizations — in GitHub checks and comments. What\nkind of workflow you want to run, and want to put in your CML report, is up to\nyou.\n\n### Using CML with DVC\n\nIn many ML projects, data isn't stored in a Git repository, but needs to be\ndownloaded from external sources. [DVC](https:\u002F\u002Fdvc.org) is a common way to\nbring data to your CML runner. DVC also lets you visualize how metrics differ\nbetween commits to make reports like this:\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fiterative_cml_readme_276cb4d146c4.png)\n\nThe `.github\u002Fworkflows\u002Fcml.yaml` file used to create this report is:\n\n```yaml\nname: model-training\non: [push]\njobs:\n  run:\n    runs-on: ubuntu-latest\n    container: ghcr.io\u002Fiterative\u002Fcml:0-dvc2-base1\n    steps:\n      - uses: actions\u002Fcheckout@v3\n      - name: Train model\n        env:\n          REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n        run: |\n          # Install requirements\n          pip install -r requirements.txt\n\n          # Pull data & run-cache from S3 and reproduce pipeline\n          dvc pull data --run-cache\n          dvc repro\n\n          # Report metrics\n          echo \"## Metrics\" >> report.md\n          git fetch --prune\n          dvc metrics diff main --show-md >> report.md\n\n          # Publish confusion matrix diff\n          echo \"## Plots\" >> report.md\n          echo \"### Class confusions\" >> report.md\n          dvc plots diff --target classes.csv --template confusion -x actual -y predicted --show-vega main > vega.json\n          vl2png vega.json -s 1.5 > confusion_plot.png\n          echo \"![](.\u002Fconfusion_plot.png)\" >> report.md\n\n          # Publish regularization function diff\n          echo \"### Effects of regularization\" >> report.md\n          dvc plots diff --target estimators.csv -x Regularization --show-vega main > vega.json\n          vl2png vega.json -s 1.5 > plot.png\n          echo \"![](.\u002Fplot.png)\" >> report.md\n\n          cml comment create report.md\n```\n\n> :warning: If you're using DVC with cloud storage, take note of environment\n> variables for your storage format.\n\n#### Configuring Cloud Storage Providers\n\nThere are many\n[supported could storage providers](https:\u002F\u002Fdvc.org\u002Fdoc\u002Fcommand-reference\u002Fremote\u002Fmodify#available-parameters-per-storage-type).\nHere are a few examples for some of the most frequently used providers:\n\n\u003Cdetails>\n  \u003Csummary>\n  S3 and S3-compatible storage (Minio, DigitalOcean Spaces, IBM Cloud Object Storage...)\n  \u003C\u002Fsummary>\n\n```yaml\n# Github\nenv:\n  AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n  AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n  AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }}\n```\n\n> :point_right: `AWS_SESSION_TOKEN` is optional.\n\n> :point_right: `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` can also be used\n> by `cml runner` to launch EC2 instances. See [Environment Variables].\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n  \u003Csummary>\n  Azure\n  \u003C\u002Fsummary>\n\n```yaml\nenv:\n  AZURE_STORAGE_CONNECTION_STRING:\n    ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}\n  AZURE_STORAGE_CONTAINER_NAME: ${{ secrets.AZURE_STORAGE_CONTAINER_NAME }}\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n  \u003Csummary>\n  Aliyun\n  \u003C\u002Fsummary>\n\n```yaml\nenv:\n  OSS_BUCKET: ${{ secrets.OSS_BUCKET }}\n  OSS_ACCESS_KEY_ID: ${{ secrets.OSS_ACCESS_KEY_ID }}\n  OSS_ACCESS_KEY_SECRET: ${{ secrets.OSS_ACCESS_KEY_SECRET }}\n  OSS_ENDPOINT: ${{ secrets.OSS_ENDPOINT }}\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n  \u003Csummary>\n  Google Storage\n  \u003C\u002Fsummary>\n\n> :warning: Normally, `GOOGLE_APPLICATION_CREDENTIALS` is the **path** of the\n> `json` file containing the credentials. However in the action this secret\n> variable is the **contents** of the file. Copy the `json` contents and add it\n> as a secret.\n\n```yaml\nenv:\n  GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n  \u003Csummary>\n  Google Drive\n  \u003C\u002Fsummary>\n\n> :warning: After configuring your\n> [Google Drive credentials](https:\u002F\u002Fdvc.org\u002Fdoc\u002Fcommand-reference\u002Fremote\u002Fadd)\n> you will find a `json` file at\n> `your_project_path\u002F.dvc\u002Ftmp\u002Fgdrive-user-credentials.json`. Copy its contents\n> and add it as a secret variable.\n\n```yaml\nenv:\n  GDRIVE_CREDENTIALS_DATA: ${{ secrets.GDRIVE_CREDENTIALS_DATA }}\n```\n\n\u003C\u002Fdetails>\n\n## Advanced Setup\n\n### Self-hosted (On-premise or Cloud) Runners\n\nGitHub Actions are run on GitHub-hosted runners by default. However, there are\nmany great reasons to use your own runners: to take advantage of GPUs,\norchestrate your team's shared computing resources, or train in the cloud.\n\n> :point_up: **Tip!** Check out the\n> [official GitHub documentation](https:\u002F\u002Fhelp.github.com\u002Fen\u002Factions\u002Fhosting-your-own-runners\u002Fabout-self-hosted-runners)\n> to get started setting up your own self-hosted runner.\n\n#### Allocating Cloud Compute Resources with CML\n\nWhen a workflow requires computational resources (such as GPUs), CML can\nautomatically allocate cloud instances using `cml runner`. You can spin up\ninstances on AWS, Azure, GCP, or Kubernetes.\n\nFor example, the following workflow deploys a `g4dn.xlarge` instance on AWS EC2\nand trains a model on the instance. After the job runs, the instance\nautomatically shuts down.\n\nYou might notice that this workflow is quite similar to the\n[basic use case](#usage) above. The only addition is `cml runner` and a few\nenvironment variables for passing your cloud service credentials to the\nworkflow.\n\nNote that `cml runner` will also automatically restart your jobs (whether from a\n[GitHub Actions 35-day workflow timeout](https:\u002F\u002Fdocs.github.com\u002Fen\u002Factions\u002Freference\u002Fusage-limits-billing-and-administration#usage-limits)\nor a\n[AWS EC2 spot instance interruption](https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSEC2\u002Flatest\u002FUserGuide\u002Fspot-interruptions.html)).\n\n```yaml\nname: Train-in-the-cloud\non: [push]\njobs:\n  deploy-runner:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: iterative\u002Fsetup-cml@v1\n      - uses: actions\u002Fcheckout@v3\n      - name: Deploy runner on EC2\n        env:\n          REPO_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n        run: |\n          cml runner launch \\\n            --cloud=aws \\\n            --cloud-region=us-west \\\n            --cloud-type=g4dn.xlarge \\\n            --labels=cml-gpu\n  train-model:\n    needs: deploy-runner\n    runs-on: [self-hosted, cml-gpu]\n    timeout-minutes: 50400 # 35 days\n    container:\n      image: ghcr.io\u002Fiterative\u002Fcml:0-dvc2-base1-gpu\n      options: --gpus all\n    steps:\n      - uses: actions\u002Fcheckout@v3\n      - name: Train model\n        env:\n          REPO_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n        run: |\n          pip install -r requirements.txt\n          python train.py\n\n          cat metrics.txt > report.md\n          cml comment create report.md\n```\n\nIn the workflow above, the `deploy-runner` step launches an EC2 `g4dn.xlarge`\ninstance in the `us-west` region. The `model-training` step then runs on the\nnewly-launched instance. See [Environment Variables] below for details on the\n`secrets` required.\n\n> :tada: **Note that jobs can use any Docker container!** To use functions such\n> as `cml send-comment` from a job, the only requirement is to\n> [have CML installed](#local-package).\n\n#### Docker Images\n\nThe CML Docker image (`ghcr.io\u002Fiterative\u002Fcml` or `iterativeai\u002Fcml`) comes loaded\nwith Python, CUDA, `git`, `node` and other essentials for full-stack data\nscience. Different versions of these essentials are available from different\nimage tags. The tag convention is `{CML_VER}-dvc{DVC_VER}-base{BASE_VER}{-gpu}`:\n\n| `{BASE_VER}` | Software included (`-gpu`)                    |\n| ------------ | --------------------------------------------- |\n| 0            | Ubuntu 18.04, Python 2.7 (CUDA 10.1, CuDNN 7) |\n| 1            | Ubuntu 20.04, Python 3.8 (CUDA 11.2, CuDNN 8) |\n\nFor example, `iterativeai\u002Fcml:0-dvc2-base1-gpu`, or\n`ghcr.io\u002Fiterative\u002Fcml:0-dvc2-base1`.\n\n#### Arguments\n\nThe `cml runner launch` function accepts the following arguments:\n\n```\n  --labels                                  One or more user-defined labels for\n                                            this runner (delimited with commas)\n                                                       [string] [default: \"cml\"]\n  --idle-timeout                            Time to wait for jobs before\n                                            shutting down (e.g. \"5min\"). Use\n                                            \"never\" to disable\n                                                 [string] [default: \"5 minutes\"]\n  --name                                    Name displayed in the repository\n                                            once registered\n                                                    [string] [default: cml-{ID}]\n  --no-retry                                Do not restart workflow terminated\n                                            due to instance disposal or GitHub\n                                            Actions timeout            [boolean]\n  --single                                  Exit after running a single job\n                                                                       [boolean]\n  --reuse                                   Don't launch a new runner if an\n                                            existing one has the same name or\n                                            overlapping labels         [boolean]\n  --reuse-idle                              Creates a new runner only if the\n                                            matching labels don't exist or are\n                                            already busy               [boolean]\n  --docker-volumes                          Docker volumes, only supported in\n                                            GitLab         [array] [default: []]\n  --cloud                                   Cloud to deploy the runner\n                         [string] [choices: \"aws\", \"azure\", \"gcp\", \"kubernetes\"]\n  --cloud-region                            Region where the instance is\n                                            deployed. Choices: [us-east,\n                                            us-west, eu-west, eu-north]. Also\n                                            accepts native cloud regions\n                                                   [string] [default: \"us-west\"]\n  --cloud-type                              Instance type. Choices: [m, l, xl].\n                                            Also supports native types like i.e.\n                                            t2.micro                    [string]\n  --cloud-permission-set                    Specifies the instance profile in\n                                            AWS or instance service account in\n                                            GCP           [string] [default: \"\"]\n  --cloud-metadata                          Key Value pairs to associate\n                                            cml-runner instance on the provider\n                                            i.e. tags\u002Flabels \"key=value\"\n                                                           [array] [default: []]\n  --cloud-gpu                               GPU type. Choices: k80, v100, or\n                                            native types e.g. nvidia-tesla-t4\n                                                                        [string]\n  --cloud-hdd-size                          HDD size in GB              [number]\n  --cloud-ssh-private                       Custom private RSA SSH key. If not\n                                            provided an automatically generated\n                                            throwaway key will be used  [string]\n  --cloud-spot                              Request a spot instance    [boolean]\n  --cloud-spot-price                        Maximum spot instance bidding price\n                                            in USD. Defaults to the current spot\n                                            bidding price [number] [default: -1]\n  --cloud-startup-script                    Run the provided Base64-encoded\n                                            Linux shell script during the\n                                            instance initialization     [string]\n  --cloud-aws-security-group                Specifies the security group in AWS\n                                                          [string] [default: \"\"]\n  --cloud-aws-subnet,                       Specifies the subnet to use within\n  --cloud-aws-subnet-id                     AWS           [string] [default: \"\"]\n\n```\n\n#### Environment Variables\n\n> :warning: You will need to\n> [create a personal access token (PAT)](https:\u002F\u002Fhelp.github.com\u002Fen\u002Fgithub\u002Fauthenticating-to-github\u002Fcreating-a-personal-access-token-for-the-command-line)\n> with repository read\u002Fwrite access and workflow privileges. In the example\n> workflow, this token is stored as `PERSONAL_ACCESS_TOKEN`.\n\n:information_source: If using the `--cloud` option, you will also need to\nprovide access credentials of your cloud compute resources as secrets. In the\nabove example, `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` (with privileges\nto create & destroy EC2 instances) are required.\n\nFor AWS, the same credentials can also be used for\n[configuring cloud storage](#configuring-cloud-storage-providers).\n\n#### Proxy support\n\nCML support proxy via known environment variables `http_proxy` and\n`https_proxy`.\n\n#### On-premise (Local) Runners\n\nThis means using on-premise machines as self-hosted runners. The\n`cml runner launch` function is used to set up a local self-hosted runner. On a\nlocal machine or on-premise GPU cluster,\n[install CML as a package](#local-package) and then run:\n\n```bash\ncml runner launch \\\n  --repo=$your_project_repository_url \\\n  --token=$PERSONAL_ACCESS_TOKEN \\\n  --labels=\"local,runner\" \\\n  --idle-timeout=180\n```\n\nThe machine will listen for workflows from your project repository.\n\n### Local Package\n\nIn the examples above, CML is installed by the `setup-cml` action, or comes\npre-installed in a custom Docker image pulled by a CI runner. You can also\ninstall CML as a package:\n\n```bash\nnpm install --location=global @dvcorg\u002Fcml\n```\n\nYou can use `cml` without node by downloading the correct standalone binary for\nyour system from the asset section of the\n[releases](https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Freleases).\n\nYou may need to install additional dependencies to use DVC plots and Vega-Lite\nCLI commands:\n\n```bash\nsudo apt-get install -y libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev \\\n                        librsvg2-dev libfontconfig-dev\nnpm install -g vega-cli vega-lite\n```\n\nCML and Vega-Lite package installation require the NodeJS package manager\n(`npm`) which ships with NodeJS. Installation instructions are below.\n\n#### Install NodeJS\n\n- **GitHub**: This is probably not necessary when using GitHub's default\n  containers or one of CML's Docker containers. Self-hosted runners may need to\n  use a set up action to install NodeJS:\n\n```bash\nuses: actions\u002Fsetup-node@v3\n  with:\n    node-version: '16'\n```\n\n- **GitLab**: Requires direct installation.\n\n```bash\ncurl -sL https:\u002F\u002Fdeb.nodesource.com\u002Fsetup_16.x | bash\napt-get update\napt-get install -y nodejs\n```\n\n## See Also\n\nThese are some example projects using CML.\n\n- [Basic CML project](https:\u002F\u002Fgithub.com\u002Fiterative-test\u002Fcml-example-minimal)\n- [CML with DVC to pull data](https:\u002F\u002Fgithub.com\u002Fiterative-test\u002Fcml-example-dvc)\n- [CML with Tensorboard](https:\u002F\u002Fgithub.com\u002Fiterative-test\u002Fcml-example-tensorboard)\n- [CML with a small EC2 instance](https:\u002F\u002Fgithub.com\u002Fiterative-test\u002Fcml-example-cloud)\n  :key:\n- [CML with EC2 GPU](https:\u002F\u002Fgithub.com\u002Fiterative-test\u002Fcml-example-cloud-gpu)\n  :key:\n\n:key: needs a [PAT](#environment-variables).\n\n# :warning: Maintenance :warning:\n\n- ~2023-07 Nvidia has dropped container CUDA images with\n  [10.x](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fnvidia\u002Fcuda\u002Ftags?page=1&name=10)\u002F[cudnn7](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fnvidia\u002Fcuda\u002Ftags?page=1&name=cudnn7)\n  and [11.2.1](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fnvidia\u002Fcuda\u002Ftags?page=1&name=11.2.1),\n  CML images will be updated accrodingly\n","\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fiterative_cml_readme_e0cd6b456e04.png\" width=400>\n\u003C\u002Fp>\n\n[![GHA](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Ftag\u002Fiterative\u002Fsetup-cml?label=GitHub%20Actions&logo=GitHub)](https:\u002F\u002Fgithub.com\u002Fiterative\u002Fsetup-cml)\n[![npm](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002F@dvcorg\u002Fcml?logo=npm)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@dvcorg\u002Fcml)\n\n**什么是 CML？** 连续机器学习（CML）是一个开源的命令行界面 (CLI) 工具，专注于 MLOps，用于实现持续集成与交付 (CI\u002FCD)。使用它来自动化开发工作流——包括机器配置、模型训练和评估、跨项目历史比较 ML 实验，以及监控变化的数据集。\n\nCML 可以帮助训练和评估模型——并在每次 pull request (拉取请求) 时自动生成包含结果和指标的可视化报告。\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fiterative_cml_readme_38f756ea5b75.png) _一个 [神经风格迁移模型](https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml_cloud_case) 的报告示例。_\n\nCML 原则：\n\n- **[GitFlow](https:\u002F\u002Fnvie.com\u002Fposts\u002Fa-successful-git-branching-model) 用于数据科学。** 使用 GitLab 或 GitHub 管理 ML 实验，跟踪谁训练了 ML 模型或修改了数据及时间。使用 [DVC](#using-cml-with-dvc) 对数据和模型进行代码化管理，而不是推送到 Git 仓库。\n- **ML 实验自动报告。** 在每个 Git pull request 中自动生成带有指标和图表的报告。严谨的工程实践帮助您的团队做出明智的、数据驱动的决策。\n- **无需额外服务。** 使用 GitLab、Bitbucket 或 GitHub 构建您自己的 ML 平台。可选地，使用 [云存储](#configuring-cloud-storage-providers) 以及自托管或云运行器（如 AWS EC2 或 Azure）。无需数据库、服务或复杂设置。\n\n:question: 需要帮助？只是想聊聊 ML 的持续集成吗？[访问我们的 Discord 频道！](https:\u002F\u002Fdiscord.gg\u002FbzA6uY7)\n\n:play_or_pause_button: 查看我们的 [YouTube 视频系列](https:\u002F\u002Fwww.youtube.com\u002Fplaylist?list=PL7WG7YrwYcnDBDuCkFbcyjnZQrdskFsBz)，获取使用 CML 的动手 MLOps 教程！\n\n## 目录\n\n1. [设置 (GitLab, GitHub, Bitbucket)](#setup)\n2. [用法](#usage)\n3. [入门 (教程)](#getting-started)\n4. [将 CML 与 DVC 配合使用](#using-cml-with-dvc)\n5. [高级设置 (自托管，本地包)](#advanced-setup)\n6. [示例项目](#see-also)\n\n## 设置\n\n您需要一个 GitLab、GitHub 或 Bitbucket 账户才能开始。用户可能希望熟悉 [Github Actions](https:\u002F\u002Fhelp.github.com\u002Fen\u002Factions) 或 [GitLab CI\u002FCD](https:\u002F\u002Fabout.gitlab.com\u002Fstages-devops-lifecycle\u002Fcontinuous-integration)。这里我们将讨论 GitHub 用例。\n\n### GitLab\n\n请参阅我们关于 [CML with GitLab CI\u002FCD](https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fwiki\u002FCML-with-GitLab) 的文档，特别是 [personal access token (个人访问令牌)](https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fwiki\u002FCML-with-GitLab#variables) 要求。\n\n### Bitbucket\n\n请参阅我们关于 [CML with Bitbucket Cloud](https:\u002F\u002Fcml.dev\u002Fdoc\u002Fusage?tab=Bitbucket) 的文档。\n\n### GitHub\n\n任何 CML 项目中的关键文件是 `.github\u002Fworkflows\u002Fcml.yaml`：\n\n```yaml\nname: your-workflow-name\non: [push]\njobs:\n  run:\n    runs-on: ubuntu-latest\n    # optionally use a convenient Ubuntu LTS + DVC + CML image\n    # container: ghcr.io\u002Fiterative\u002Fcml:0-dvc2-base1\n    steps:\n      - uses: actions\u002Fcheckout@v3\n      # may need to setup NodeJS & Python3 on e.g. self-hosted\n      # - uses: actions\u002Fsetup-node@v3\n      #   with:\n      #     node-version: '16'\n      # - uses: actions\u002Fsetup-python@v4\n      #   with:\n      #     python-version: '3.x'\n      - uses: iterative\u002Fsetup-cml@v1\n      - name: Train model\n        run: |\n          # Your ML workflow goes here\n          pip install -r requirements.txt\n          python train.py\n      - name: Write CML report\n        env:\n          REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        run: |\n          # Post reports as comments in GitHub PRs\n          cat results.txt >> report.md\n          cml comment create report.md\n```\n\n## 用法\n\n我们在 [自定义 Docker 镜像](https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fblob\u002Fmains\u002FDockerfile) 上预先安装了 CML 和其他有用的库。在上面的示例中，取消注释字段 `container: ghcr.io\u002Fiterative\u002Fcml:0-dvc2-base1)` 将使运行器拉取 CML Docker 镜像。该镜像为了方便起见，已在 Ubuntu LTS 基础之上设置了 Node.js、Python 3、DVC 和 CML。\n\n### CML 函数\n\nCML 提供了一系列函数，帮助将 ML 工作流的输出（包括数值数据和关于模型性能的可视化）打包到 CML 报告中。\n\n以下是用于编写 Markdown 报告并将这些报告交付给 CI 系统的 CML 函数表。\n\n| 函数                  | 描述                                                      | 示例输入                                              |\n| ------------------------- | ---------------------------------------------------------------- | ----------------------------------------------------------- |\n| `cml runner launch`       | 在本地启动运行器或由云提供商托管            | 参见 [参数](https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml#arguments) |\n| `cml comment create`      | 将 CML 报告作为评论返回到您的 GitLab\u002FGitHub 工作流中    | `\u003Cpath to report> --head-sha \u003Csha>`                         |\n| `cml check create`        | 将 CML 报告作为检查项返回到 GitHub                           | `\u003Cpath to report> --head-sha \u003Csha>`                         |\n| `cml pr create`           | 将给定文件提交到新分支并创建 pull request | `\u003Cpath>...`                                                 |\n| `cml tensorboard connect` | 返回 TensorBoard.dev 页面的链接                          | `--logdir \u003Cpath to logs> --title \u003Cexperiment title> --md`   |\n\n#### CML 报告\n\n`cml comment create` 命令可用于发布报告。CML 报告是用 Markdown 编写的（[GitHub](https:\u002F\u002Fgithub.github.com\u002Fgfm)、[GitLab](https:\u002F\u002Fdocs.gitlab.com\u002Fee\u002Fuser\u002Fmarkdown.html) 或 [Bitbucket](https:\u002F\u002Fconfluence.atlassian.com\u002Fbitbucketserver\u002Fmarkdown-syntax-guide-776639995.html) 风格）。这意味着它们可以包含图片、表格、格式化文本、HTML 块、代码片段等——实际上，您在 CML 报告中放入什么取决于您。一些示例：\n\n:spiral_notepad: **文本** 使用您喜欢的方法写入报告。例如，复制包含 ML 模型训练结果的文本文件的内容：\n\n```bash\ncat results.txt >> report.md\n```\n\n:framed_picture: **图片** 使用 Markdown 或 HTML 显示图片。请注意，如果图片是您的 ML 工作流的输出（即由您的工作流生成），它可以被上传并自动包含到您的 CML 报告中。例如，如果 `graph.png` 是由 `python train.py` 输出的，请运行：\n\n```bash\necho \"![](.\u002Fgraph.png)\" >> report.md\ncml comment create report.md\n```\n\n### 开始使用\n\n1. Fork（复制）我们的\n   [示例项目仓库](https:\u002F\u002Fgithub.com\u002Fiterative-test\u002Fcml-example-base)。\n\n> :warning: 注意，如果您使用的是 GitLab，\n> [您需要创建一个 Personal Access Token（个人访问令牌）](https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fwiki\u002FCML-with-GitLab#variables)\n> 才能使此示例正常工作。\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fiterative_cml_readme_65feb7e230b4.png)\n\n> :warning: 以下步骤都可以在 GitHub 浏览器界面中完成。但是，为了跟随命令操作，我们建议将您的 Fork（复制）克隆到本地工作站：\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002F\u003Cyour-username>\u002Fexample_cml\n```\n\n2. 要创建 CML（Continuous Machine Learning）工作流，请将以下内容复制到新文件\n   `.github\u002Fworkflows\u002Fcml.yaml`：\n\n```yaml\nname: model-training\non: [push]\njobs:\n  run:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v3\n      - uses: actions\u002Fsetup-python@v4\n      - uses: iterative\u002Fsetup-cml@v1\n      - name: Train model\n        env:\n          REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        run: |\n          pip install -r requirements.txt\n          python train.py\n\n          cat metrics.txt >> report.md\n          echo \"![](.\u002Fplot.png)\" >> report.md\n          cml comment create report.md\n```\n\n3. 在您选择的文本编辑器中，将 `train.py` 的第 16 行修改为 `depth = 5`。\n\n4. 提交并推送更改：\n\n```bash\ngit checkout -b experiment\ngit add . && git commit -m \"modify forest depth\"\ngit push origin experiment\n```\n\n5. 在 GitHub 上，打开一个拉取请求（Pull Request）以比较 `experiment` 分支和\n   `main` 分支。\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fiterative_cml_readme_b04897c65b2e.png)\n\n很快，您应该在拉取请求中看到来自 `github-actions` 的评论，其中包含您的 CML 报告。这是您工作流中 `cml send-comment` 函数的结果。\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fiterative_cml_readme_1bff7ae42328.png)\n\n这是 CML 工作流的概述：\n\n- 您将更改推送到 GitHub 仓库，\n- 运行 `.github\u002Fworkflows\u002Fcml.yaml` 文件中的工作流，以及\n- 生成报告并发布到 GitHub。\n\nCML 功能允许您在 GitHub Checks（检查）和评论中显示工作流的相关结果——例如模型性能指标和可视化图表。您想要运行哪种工作流，以及想要在 CML 报告中放入什么内容，由您决定。\n\n### 将 CML 与 DVC 结合使用\n\n在许多机器学习（ML）项目中，数据不存储在 Git 仓库中，而是需要从外部来源下载。[DVC](https:\u002F\u002Fdvc.org)（Data Version Control）是将数据带入您的 CML 运行器的常见方式。DVC 还允许您可视化不同提交之间的指标差异，从而生成如下报告：\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fiterative_cml_readme_276cb4d146c4.png)\n\n用于创建此报告的 `.github\u002Fworkflows\u002Fcml.yaml` 文件如下：\n\n```yaml\nname: model-training\non: [push]\njobs:\n  run:\n    runs-on: ubuntu-latest\n    container: ghcr.io\u002Fiterative\u002Fcml:0-dvc2-base1\n    steps:\n      - uses: actions\u002Fcheckout@v3\n      - name: Train model\n        env:\n          REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n        run: |\n          # Install requirements\n          pip install -r requirements.txt\n\n          # Pull data & run-cache from S3 and reproduce pipeline\n          dvc pull data --run-cache\n          dvc repro\n\n          # Report metrics\n          echo \"## Metrics\" >> report.md\n          git fetch --prune\n          dvc metrics diff main --show-md >> report.md\n\n          # Publish confusion matrix diff\n          echo \"## Plots\" >> report.md\n          echo \"### Class confusions\" >> report.md\n          dvc plots diff --target classes.csv --template confusion -x actual -y predicted --show-vega main > vega.json\n          vl2png vega.json -s 1.5 > confusion_plot.png\n          echo \"![](.\u002Fconfusion_plot.png)\" >> report.md\n\n          # Publish regularization function diff\n          echo \"### Effects of regularization\" >> report.md\n          dvc plots diff --target estimators.csv -x Regularization --show-vega main > vega.json\n          vl2png vega.json -s 1.5 > plot.png\n          echo \"![](.\u002Fplot.png)\" >> report.md\n\n          cml comment create report.md\n```\n\n> :warning: 如果您将 DVC 与云存储一起使用，请注意您的存储格式的环境变量。\n\n#### 配置云存储提供商\n\n有许多 [支持的云存储提供商](https:\u002F\u002Fdvc.org\u002Fdoc\u002Fcommand-reference\u002Fremote\u002Fmodify#available-parameters-per-storage-type)。\n以下是一些最常用提供商的示例：\n\n\u003Cdetails>\n  \u003Csummary>\n  S3 及兼容 S3 的存储（Minio、DigitalOcean Spaces、IBM Cloud Object Storage...）\n  \u003C\u002Fsummary>\n\n```yaml\n# Github\nenv:\n  AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n  AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n  AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }}\n```\n\n> :point_right: `AWS_SESSION_TOKEN` 是可选的。\n\n> :point_right: `AWS_ACCESS_KEY_ID` 和 `AWS_SECRET_ACCESS_KEY` 也可被 `cml runner`（运行器）用于启动 EC2 实例。请参阅 [环境变量]。\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n  \u003Csummary>\n  Azure\n  \u003C\u002Fsummary>\n\n```yaml\nenv:\n  AZURE_STORAGE_CONNECTION_STRING:\n    ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}\n  AZURE_STORAGE_CONTAINER_NAME: ${{ secrets.AZURE_STORAGE_CONTAINER_NAME }}\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n  \u003Csummary>\n  Aliyun\n  \u003C\u002Fsummary>\n\n```yaml\nenv:\n  OSS_BUCKET: ${{ secrets.OSS_BUCKET }}\n  OSS_ACCESS_KEY_ID: ${{ secrets.OSS_ACCESS_KEY_ID }}\n  OSS_ACCESS_KEY_SECRET: ${{ secrets.OSS_ACCESS_KEY_SECRET }}\n  OSS_ENDPOINT: ${{ secrets.OSS_ENDPOINT }}\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n  \u003Csummary>\n  Google Storage\n  \u003C\u002Fsummary>\n\n> :warning: 通常，`GOOGLE_APPLICATION_CREDENTIALS` 是包含凭据的 **JSON** 文件的**路径**。但在该 Action 中，此密钥变量是文件的**内容**。复制 JSON 内容并将其添加为密钥。\n\n```yaml\nenv:\n  GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n  \u003Csummary>\n  Google Drive\n  \u003C\u002Fsummary>\n\n> :warning: 配置您的\n> [Google Drive 凭据](https:\u002F\u002Fdvc.org\u002Fdoc\u002Fcommand-reference\u002Fremote\u002Fadd)\n> 后，您将在\n> `your_project_path\u002F.dvc\u002Ftmp\u002Fgdrive-user-credentials.json` 找到一个 **JSON** 文件。复制其内容\n> 并将其添加为密钥变量。\n\n```yaml\nenv:\n  GDRIVE_CREDENTIALS_DATA: ${{ secrets.GDRIVE_CREDENTIALS_DATA }}\n```\n\n\u003C\u002Fdetails>\n\n## 高级设置\n\n### 自托管（本地或云端）运行器\n\n默认情况下，GitHub Actions 在 GitHub 托管的运行器上运行。但是，使用自己的运行器有很多很好的理由：利用 GPU、协调团队共享的计算资源，或在云端进行训练。\n\n> :point_up: **提示！** 查看\n> [官方 GitHub 文档](https:\u002F\u002Fhelp.github.com\u002Fen\u002Factions\u002Fhosting-your-own-runners\u002Fabout-self-hosted-runners)\n> 以开始设置您自己的自托管运行器。\n\n#### 使用 CML 分配云计算资源\n\n当工作流需要计算资源（如 GPU）时，CML 可以使用 `cml runner`（CML Runner）自动分配云实例。你可以在 AWS、Azure、GCP 或 Kubernetes 上启动实例。\n\n例如，以下工作流在 AWS EC2 上部署一个 `g4dn.xlarge` 实例并在该实例上训练模型。作业运行后，实例会自动关闭。\n\n你可能会注意到这个工作流与上面的 [基本用例](#usage) 非常相似。唯一的区别是增加了 `cml runner` 和一些环境变量，用于将云服务凭证传递给工作流。\n\n请注意，`cml runner` 也会自动重启你的任务（无论是由于 [GitHub Actions 35 天工作流超时](https:\u002F\u002Fdocs.github.com\u002Fen\u002Factions\u002Freference\u002Fusage-limits-billing-and-administration#usage-limits) 还是 [AWS EC2 竞价实例中断](https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSEC2\u002Flatest\u002FUserGuide\u002Fspot-interruptions.html)）。\n\n```yaml\nname: Train-in-the-cloud\non: [push]\njobs:\n  deploy-runner:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: iterative\u002Fsetup-cml@v1\n      - uses: actions\u002Fcheckout@v3\n      - name: Deploy runner on EC2\n        env:\n          REPO_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n        run: |\n          cml runner launch \\\n            --cloud=aws \\\n            --cloud-region=us-west \\\n            --cloud-type=g4dn.xlarge \\\n            --labels=cml-gpu\n  train-model:\n    needs: deploy-runner\n    runs-on: [self-hosted, cml-gpu]\n    timeout-minutes: 50400 # 35 days\n    container:\n      image: ghcr.io\u002Fiterative\u002Fcml:0-dvc2-base1-gpu\n      options: --gpus all\n    steps:\n      - uses: actions\u002Fcheckout@v3\n      - name: Train model\n        env:\n          REPO_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n        run: |\n          pip install -r requirements.txt\n          python train.py\n\n          cat metrics.txt > report.md\n          cml comment create report.md\n```\n\n在上述工作流中，`deploy-runner` 步骤在 `us-west` 区域启动了一个 EC2 `g4dn.xlarge` 实例。然后 `model-training` 步骤在新启动的实例上运行。有关所需 `secrets`（机密）的详细信息，请参见下方的 [环境变量]。\n\n> :tada: **注意：作业可以使用任何 Docker 容器！** 要从作业中使用 `cml send-comment` 等功能，唯一的要求是 [安装 CML](#local-package)。\n\n#### Docker 镜像\n\nCML Docker 镜像（`ghcr.io\u002Fiterative\u002Fcml` 或 `iterativeai\u002Fcml`）预装了 Python、CUDA、`git`、`node` 以及全栈数据科学所需的其他基础组件。这些基础组件的不同版本可通过不同的镜像标签获取。标签约定为 `{CML_VER}-dvc{DVC_VER}-base{BASE_VER}{-gpu}`：\n\n| `{BASE_VER}` | 包含的软件（`-gpu`）                    |\n| ------------ | --------------------------------------------- |\n| 0            | Ubuntu 18.04, Python 2.7 (CUDA 10.1, CuDNN 7) |\n| 1            | Ubuntu 20.04, Python 3.8 (CUDA 11.2, CuDNN 8) |\n\n例如，`iterativeai\u002Fcml:0-dvc2-base1-gpu`，或 `ghcr.io\u002Fiterative\u002Fcml:0-dvc2-base1`。\n\n#### 参数\n\n`cml runner launch` 函数接受以下参数：\n\n--labels                                  一个或多个用户定义的标签，用于此运行器 (Runner)（以逗号分隔）\n                                            [string] [default: \"cml\"]\n  --idle-timeout                            关闭前等待作业的时间（例如 \"5min\"）。使用\n                                            \"never\" 可禁用\n                                                 [string] [default: \"5 minutes\"]\n  --name                                    注册后在仓库中显示的名称\n                                                    [string] [default: cml-{ID}]\n  --no-retry                                不重启因实例销毁或 GitHub\n                                            Actions 超时而终止的工作流            [boolean]\n  --single                                  运行单个作业后退出\n                                                                       [boolean]\n  --reuse                                   如果已存在的运行器具有相同名称或\n                                            重叠的标签，则不启动新的运行器         [boolean]\n  --reuse-idle                              仅当匹配的标签不存在或已占用时，才\n                                            创建新的运行器               [boolean]\n  --docker-volumes                          Docker 卷，仅在 GitLab 中支持\n                                            [array] [default: []]\n  --cloud                                   部署运行器的云服务\n                         [string] [choices: \"aws\", \"azure\", \"gcp\", \"kubernetes\"]\n  --cloud-region                            实例部署的区域。选项：[us-east,\n                                            us-west, eu-west, eu-north]。也\n                                            接受原生云区域\n                                                   [string] [default: \"us-west\"]\n  --cloud-type                              实例类型。选项：[m, l, xl]。\n                                            也支持原生类型，如 t2.micro                    [string]\n  --cloud-permission-set                    指定 AWS 中的实例配置文件或 GCP\n                                            中的实例服务账户           [string] [default: \"\"]\n  --cloud-metadata                          与提供商上的 cml-runner 实例关联\n                                            的键值对，即标签\u002F标签 \"key=value\"\n                                                           [array] [default: []]\n  --cloud-gpu                               GPU 类型。选项：k80, v100，或\n                                            原生类型，例如 nvidia-tesla-t4\n                                                                        [string]\n  --cloud-hdd-size                          HDD 大小（GB）              [number]\n  --cloud-ssh-private                       自定义私有 RSA SSH 密钥。如果未\n                                            提供，将使用自动生成的临时密钥  [string]\n  --cloud-spot                              请求抢占式实例    [boolean]\n  --cloud-spot-price                        抢占式实例的最高竞价价格\n                                            （美元）。默认为当前竞价价格 [number] [default: -1]\n  --cloud-startup-script                    在实例初始化期间运行提供的 Base64 编码\n                                            的 Linux shell 脚本     [string]\n  --cloud-aws-security-group                指定 AWS 中的安全组\n                                                          [string] [default: \"\"]\n  --cloud-aws-subnet,                       指定要在 AWS 内使用的子网\n  --cloud-aws-subnet-id                     AWS           [string] [default: \"\"]\n\n#### 环境变量\n\n> :warning: 你需要\n> [创建一个个人访问令牌 (PAT)](https:\u002F\u002Fhelp.github.com\u002Fen\u002Fgithub\u002Fauthenticating-to-github\u002Fcreating-a-personal-access-token-for-the-command-line)\n> 并拥有仓库读写权限及工作流权限。在示例工作流中，此令牌存储为 `PERSONAL_ACCESS_TOKEN`。\n\n:information_source: 如果使用 `--cloud` 选项，你还需要提供云计算资源的访问凭据作为机密。在\n上述示例中，需要提供 `AWS_ACCESS_KEY_ID` 和 `AWS_SECRET_ACCESS_KEY`（具有创建和销毁 EC2 实例的权限）。\n\n对于 AWS，相同的凭据也可用于\n[配置云存储](#configuring-cloud-storage-providers)。\n\n#### 代理支持\n\nCML 通过已知环境变量 `http_proxy` 和\n`https_proxy` 支持代理。\n\n#### 本地部署 (On-premise) 运行器\n\n这意味着使用本地部署的机器作为自托管运行器。`cml runner launch` 函数用于设置本地自托管运行器。在本地机器或本地 GPU 集群上，\n[安装 CML 包](#local-package)，然后运行：\n\n```bash\ncml runner launch \\\n  --repo=$your_project_repository_url \\\n  --token=$PERSONAL_ACCESS_TOKEN \\\n  --labels=\"local,runner\" \\\n  --idle-timeout=180\n```\n\n该机器将监听来自项目仓库的工作流。\n\n### 本地包\n\n在上述示例中，CML 是通过 `setup-cml` action 安装的，或者随持续集成 (CI) 运行器拉取的自定义 Docker 镜像预装。您也可以将 CML 作为包进行安装：\n\n```bash\nnpm install --location=global @dvcorg\u002Fcml\n```\n\n您可以通过从 [releases](https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Freleases) 的资源部分下载适用于您系统的正确独立二进制文件，从而在不使用 Node 的情况下使用 cml。\n\n您可能需要安装额外的依赖项才能使用 DVC 图表和 Vega-Lite 命令行命令：\n\n```bash\nsudo apt-get install -y libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev \\\n                        librsvg2-dev libfontconfig-dev\nnpm install -g vega-cli vega-lite\n```\n\nCML 和 Vega-Lite 包的安装需要 NodeJS 包管理器（npm），该管理器随 NodeJS 一同提供。安装说明如下。\n\n#### 安装 NodeJS\n\n- **GitHub**：在使用 GitHub 默认容器或 CML 的 Docker 容器之一时，这可能不是必需的。自托管运行器可能需要使用设置 action 来安装 NodeJS：\n\n```bash\nuses: actions\u002Fsetup-node@v3\n  with:\n    node-version: '16'\n```\n\n- **GitLab**：需要直接安装。\n\n```bash\ncurl -sL https:\u002F\u002Fdeb.nodesource.com\u002Fsetup_16.x | bash\napt-get update\napt-get install -y nodejs\n```\n\n## 参见\n\n以下是一些使用 CML 的示例项目。\n\n- [基础 CML 项目](https:\u002F\u002Fgithub.com\u002Fiterative-test\u002Fcml-example-minimal)\n- [使用 DVC 拉取数据的 CML](https:\u002F\u002Fgithub.com\u002Fiterative-test\u002Fcml-example-dvc)\n- [使用 Tensorboard 的 CML](https:\u002F\u002Fgithub.com\u002Fiterative-test\u002Fcml-example-tensorboard)\n- [使用小型 EC2 实例的 CML](https:\u002F\u002Fgithub.com\u002Fiterative-test\u002Fcml-example-cloud)\n  :key:\n- [使用 EC2 GPU 的 CML](https:\u002F\u002Fgithub.com\u002Fiterative-test\u002Fcml-example-cloud-gpu)\n  :key:\n\n:key: 需要 [个人访问令牌 (PAT)](#environment-variables)。\n\n# :warning: 维护 :warning:\n\n- ~2023-07 Nvidia 已停止提供带有 [10.x](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fnvidia\u002Fcuda\u002Ftags?page=1&name=10)\u002F[cudnn7](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fnvidia\u002Fcuda\u002Ftags?page=1&name=cudnn7)\n  和 [11.2.1](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fnvidia\u002Fcuda\u002Ftags?page=1&name=11.2.1) 的容器 CUDA 镜像，CML 镜像将相应更新","# CML 快速上手指南\n\n**CML (Continuous Machine Learning)** 是一个开源的 CLI 工具，专注于 MLOps 领域的持续集成与交付（CI\u002FCD）。它可自动在每次 Pull Request 时训练和评估模型，并生成包含指标和图表的可视化报告。\n\n## 1. 环境准备\n\n*   **账号要求**：需要 GitHub、GitLab 或 Bitbucket 账户（本指南以 **GitHub** 为例）。\n*   **系统环境**：推荐使用 Ubuntu LTS 系统，或直接使用 CML 提供的预配置 Docker 镜像。\n*   **前置知识**：熟悉 Git 操作及 GitHub Actions \u002F GitLab CI\u002FCD 基础概念。\n*   **网络环境**：由于依赖 GitHub 和 Docker Hub，请确保开发环境能正常访问相关服务。\n\n## 2. 安装步骤\n\nCML 主要通过两种方式使用：在 CI 流水线中集成，或在本地运行 CLI。\n\n### 方式一：在 GitHub Actions 中使用（推荐）\n无需手动安装软件，直接在 Workflow 文件中引入 Action 即可。在 `.github\u002Fworkflows\u002F` 目录下创建文件，添加以下步骤：\n\n```yaml\n- uses: iterative\u002Fsetup-cml@v1\n```\n\n### 方式二：本地安装 CLI\n若需在本地测试命令，可通过 npm 全局安装：\n\n```bash\nnpm install -g @dvcorg\u002Fcml\n```\n\n> 注意：也可使用官方提供的 Docker 镜像，其中已预装 NodeJS、Python3、DVC 和 CML。\n> ```yaml\n> container: ghcr.io\u002Fiterative\u002Fcml:0-dvc2-base1\n> ```\n\n## 3. 基本使用\n\n创建一个简单的模型训练工作流，将结果自动发布为 PR 评论。\n\n### 第一步：创建工作流文件\n在项目根目录创建 `.github\u002Fworkflows\u002Fcml.yaml`，内容如下：\n\n```yaml\nname: model-training\non: [push]\njobs:\n  run:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v3\n      - uses: actions\u002Fsetup-python@v4\n      - uses: iterative\u002Fsetup-cml@v1\n      - name: Train model\n        env:\n          REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        run: |\n          pip install -r requirements.txt\n          python train.py\n\n          cat metrics.txt >> report.md\n          echo \"![](.\u002Fplot.png)\" >> report.md\n          cml comment create report.md\n```\n\n### 第二步：执行与查看\n1.  提交并推送代码到远程仓库。\n2.  在 GitHub 上打开对应的 Pull Request。\n3.  等待工作流运行完成，你将看到由 `github-actions` 机器人发布的评论，其中包含你的训练报告和图表。\n\n### 常用命令参考\n| 命令 | 描述 |\n| :--- | :--- |\n| `cml comment create` | 将报告作为评论发布到 Git 工作流中 |\n| `cml check create` | 将报告作为检查项发布到 GitHub |\n| `cml pr create` | 提交文件到新分支并创建 Pull Request |\n| `cml tensorboard connect` | 返回 Tensorboard.dev 页面链接 |","某电商风控团队正在开发用户信用评分模型，面临频繁迭代与协作效率低下的挑战。\n\n### 没有 cml 时\n- 每次算法调整都需要工程师手动在服务器执行训练脚本，占用大量计算资源且易遗漏步骤。\n- 实验产生的准确率、召回率等指标分散在本地日志文件中，难以跨分支进行横向对比。\n- 代码审查人员无法直观评估模型变更带来的性能波动，往往直到上线后才发现问题。\n- 数据分布发生变化时，缺乏自动化机制来预警模型可能出现的性能衰退。\n\n### 使用 cml 后\n- 代码提交即自动触发训练任务，cml 无需人工介入即可验证新策略的有效性。\n- 每个 Pull Request 会自动生成包含可视化图表和关键指标的评论报告，一目了然。\n- 团队成员可直接在 PR 界面查看当前版本与基线模型的详细性能对比数据。\n- 结合 DVC 管理数据版本，自动监测数据集变化并关联模型评估结果，确保稳定性。\n\ncml 将机器学习工程化落地，实现了从代码提交到模型评估的闭环自动化。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fiterative_cml_38f756ea.png","iterative","Iterative","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fiterative_11468046.png","Data Tools for AI and ML",null,"DVCorg","https:\u002F\u002Fdatachain.ai","https:\u002F\u002Fgithub.com\u002Fiterative",[84,88,92],{"name":85,"color":86,"percentage":87},"JavaScript","#f1e05a",97.7,{"name":89,"color":90,"percentage":91},"Dockerfile","#384d54",2.2,{"name":93,"color":94,"percentage":95},"HCL","#844FBA",0.1,4169,345,"2026-04-03T07:24:10","Apache-2.0","Linux","未说明",{"notes":103,"python":104,"dependencies":105},"推荐使用官方 Ubuntu LTS 基础 Docker 镜像（包含 DVC 和 CML 预装）；需配合 GitHub\u002FGitLab\u002FBitbucket 使用；需配置 REPO_TOKEN 等环境变量；具体机器学习库依赖由用户项目的 requirements.txt 定义。","3.x",[106,107,108,109],"DVC","Node.js","Python","Git",[54,53,51,13],[112,113,114,115,116,117,118,119,120,121,122,123,124],"machine-learning","data-science","cicd","ci-cd","github-actions","gitlab-ci","developer-tools","continuous-integration","continuous-delivery","ci","bitbucket-pipelines","hacktoberfest","cli",4,"2026-03-27T02:49:30.150509","2026-04-06T06:44:42.276701",[129,134,138,143,147,152],{"id":130,"question_zh":131,"answer_zh":132,"source_url":133},3507,"NVIDIA 驱动报错 `nvml error: driver not loaded` 如何解决？","此错误通常表示容器内未加载 NVIDIA 驱动。需要手动在 Runner 实例上安装驱动。根据社区经验，可以通过下载指定版本的 NVIDIA 驱动包，编译内核模块并安装来解决。具体步骤包括更新 apt、下载驱动、克隆 open-gpu-kernel-modules 仓库编译模块，最后运行安装脚本。","https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fissues\u002F860",{"id":135,"question_zh":136,"answer_zh":137,"source_url":133},3508,"如何在 CML Runner 中手动安装 NVIDIA 驱动？","可以使用以下 Bash 脚本流程（需根据实际环境调整）：\n1. 更新软件源并安装构建工具：`apt-get update -y && apt-get install -y git build-essential`\n2. 下载驱动安装包：`wget \"$nvidia_dl_path$driver_version\u002FNVIDIA-Linux-x86_64-$driver_version.run\"`\n3. 编译并安装内核模块：从 open-gpu-kernel-modules 仓库 clone 对应版本，执行 `make modules` 和 `make modules_install`\n4. 运行安装程序：`sh .\u002Fweb-installer --silent --no-kernel-modules`\n注意：脚本可能因版本不同而有所变化，请确保驱动版本与宿主机兼容。",{"id":139,"question_zh":140,"answer_zh":141,"source_url":142},3509,"为什么 `cml runner` 会在 GitHub Action 完成前提前关闭？","这通常是由于 Runner 实例资源耗尽（如内存或 CPU 被占满）导致的。虽然设置了 `--idle-timeout`，但如果进程因资源饥饿（Starved of resources）而无法响应，GitHub Actions 可能会将其标记为 Cancelled 或自动终止 Runner。即使日志显示是超时，根本原因往往是硬件资源不足。","https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fissues\u002F808",{"id":144,"question_zh":145,"answer_zh":146,"source_url":142},3510,"如何避免 CML Runner 因资源问题被意外取消？","1. 检查实例规格：确保使用的云实例类型（如 GCP 的 e2-standard-16）有足够的资源处理您的工作负载。\n2. 调整超时设置：如果作业较长，适当增加 `--idle-timeout` 的值。\n3. 监控资源：观察 Runner 在运行期间的资源使用情况，避免因资源耗尽导致进程崩溃。如果是小实例类型，更容易出现此类问题。",{"id":148,"question_zh":149,"answer_zh":150,"source_url":151},3511,"配置 CML 时应该使用哪个 Token 环境变量？","建议使用 `CML_TOKEN` 或 `CML_CI_TOKEN` 等以 `CML_` 开头的环境变量，而不是旧的 `REPO_TOKEN`。这样可以避免潜在的命名空间冲突，并更清晰地表明该 Token 用于启动 Runner 或被 Runner 使用（可以是项目 Token、组织 Token 或 Bot Token）。","https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fissues\u002F763",{"id":153,"question_zh":154,"answer_zh":155,"source_url":156},3512,"CML CLI 命令的推荐命名规范是什么？","为了保持一致性和直观性，推荐使用 `cml \u003Cnoun> \u003Cverb>` 的结构。例如：\n- `cml ci [setup]` (原 `cml ci`)\n- `cml pr [create]` (原 `cml pr`)\n- `cml runner [launch]` (原 `cml runner`)\n- `cml {comment,report} {create,update}` (原 `cml send-comment`)\n- `cml check {create,update}` (原 `cml send-github-check`)\n注：部分命令仍在规划统一中，请以最新文档为准。","https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fissues\u002F762",[158,163,168,173,178,183,188,193,198,203,208,213,218,223,228,233,238,243,248,253],{"id":159,"version":160,"summary_zh":161,"released_at":162},103134,"v0.19.0","## What's Changed\r\n* Fix external-trigger event_name by @dacbd in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1346\r\n* Fix `cml pr create` on subdirectories by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1345\r\n* Add the option to define the target branch on pull requests by @dfinteligenz in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1326\r\n* Bump version to v0.18.21 by @casperdcl in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1353\r\n* Revert \"Bump version to v0.18.21 (#1353)\" by @dacbd in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1354\r\n* Improve error message by @balazspeczeli in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1349\r\n* Fix artifact upload on release workflow by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1356\r\n* Bump version to v0.18.21 by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1357\r\n* GitLab  - check comment body size by @dacbd in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1350\r\n* Pin Node.js version on GitHub Actions test job by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1382\r\n* Update tensorboard.dev credentials by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1383\r\n* Add support for Kubernetes arbitrary node selector by @ludelafo in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1370\r\n* Add template for epic\u002Fstory issues by @omesser in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1368\r\n* Revert GitLab Runner version pin by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1343\r\n* Update Homebrew on GitHub Actions by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1384\r\n* Warn on non-existent local paths by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1341\r\n* Bump vm2 from 3.9.11 to 3.9.19 by @dependabot in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1381\r\n* Bump yaml, husky and lint-staged by @dependabot in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1378\r\n* Bump version to v0.19.0 by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1385\r\n\r\n## New Contributors\r\n* @dfinteligenz made their first contribution in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1326\r\n* @balazspeczeli made their first contribution in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1349\r\n* @ludelafo made their first contribution in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1370\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fcompare\u002Fv0.18.20...v0.19.0","2023-06-04T12:36:23",{"id":164,"version":165,"summary_zh":166,"released_at":167},103135,"v0.18.21","* Add `cml pr --target-branch` (#1326)\r\n* Fix `cml pr create` on subdirectories (#1345)\r\n* Improve error message (#1349)\r\n* Bump version to v0.18.21 & fix release process (#1346, #1353, #1354, #1355, #1356, #1357)\r\n","2023-02-14T19:13:54",{"id":169,"version":170,"summary_zh":171,"released_at":172},103136,"v0.18.20","* tweak release workflow again (#1339)","2023-02-02T04:04:52",{"id":174,"version":175,"summary_zh":176,"released_at":177},103137,"v0.18.19","* Add runner output debug logs (#1334)\r\n* Partially fix release workflow (#1337)","2023-02-02T04:04:36",{"id":179,"version":180,"summary_zh":181,"released_at":182},103138,"v0.18.18","* Add missing ProxyAgent to node-fetch (#1321)\r\n* Display a meaningful message if `git` is not available (#1305)\r\n* Send external dispatch on push to master (#1323)\r\n* [Snyk] Security upgrade simple-git from 3.15.0 to 3.16.0 (#1327)\r\n* Pin GitLab Runner to v15.7.3 (#1333)","2023-02-13T23:09:40",{"id":184,"version":185,"summary_zh":186,"released_at":187},103139,"v0.18.17","* Use default token to upload release artefacts (#1316)\r\n* Fix `yargs` global options bypassing strict checks (#1317)\r\n* Bump version to v0.18.17 (#1318)\r\n\r\n","2023-01-17T15:25:33",{"id":189,"version":190,"summary_zh":191,"released_at":192},103140,"v0.18.16","* Fix hidden options (#1314)\r\n* Bump json5 from 1.0.1 to 1.0.2 (#1307)\r\n* Bump version to v0.18.16 (#1315)","2023-01-17T05:27:21",{"id":194,"version":195,"summary_zh":196,"released_at":197},103141,"v0.18.15","* Add `cml runner launch --cloud-image` (#1302)\r\n* Add commit hash to watermark (#1309)\r\n* Rename `--token` to `--driver-token` (#1272)\r\n* Fix `cml runner` idleness detection logic (#1299)\r\n* Fix missing `await` and increase polling delay (#1300)\r\n* Fix rate limit issues in parallel workflows (#1303)\r\n* Bump version to v0.18.15 (#1312)","2023-01-16T04:04:58",{"id":199,"version":200,"summary_zh":201,"released_at":202},103142,"v0.18.14","* Add `comment {create,update} --target` flag (#1228)\r\n  - Deprecate `--pr,--commit-sha,--head-sha`\r\n  - Remove need for `checkout ${{github.event.pull_request.head.sha}}`\r\n* Fetch tags with `cml ci --fetch-depth` (#1258 -> #1269)\r\n* Harden ancillary `exec` function (#1273 -> #1275, #1281)\r\n* Fix invalid `terraform` usage (#1293)\r\n* Fix invalid deprecation warnings (#1287 -> #1288)\r\n* Debug logging for Bitbucket & GitLab driver requests (#1284)\r\n* Allow `cml pr` without arguments (#1203 -> #1263, #1270, #1277)\r\n* Exclude `yaml` from linting (#1294)\r\n* Bump `simple-git` 3.11.0 -> 3.15.0 (#1274)","2022-12-22T15:11:06",{"id":204,"version":205,"summary_zh":206,"released_at":207},103143,"v0.18.13","* Revert \"Allow running `cml pr create` without files (#1263)\" (#1270)\r\n* Bump version (#1271)\r\n","2022-12-02T18:27:32",{"id":209,"version":210,"summary_zh":211,"released_at":212},103144,"v0.18.12","* Allow running `cml pr create` without files (#1263)\r\n* Warn on pre-existing branch in `cml pr create` (#1254 by @magdapoppins)\r\n* Default CML name change (#1265, https:\u002F\u002Fgithub.com\u002Fiterative\u002Fterraform-provider-iterative\u002Fpull\u002F726)\r\n* Misc test\u002Fframework updates\r\n  * add a `.nvmrc` file to support using the intended Node.js version (#1257 by @magdapoppins)\r\n  * replace workflow `set-output` => `GITHUB_OUTPUT` (#1259)\r\n  * fix multi-line workflow `output` (#1267)\r\n  * bump actions (#1260)\r\n  * bump versions (#1268, #1266)","2022-12-02T17:08:20",{"id":214,"version":215,"summary_zh":216,"released_at":217},103145,"v0.18.10","* Update container images","2022-11-11T01:37:49",{"id":219,"version":220,"summary_zh":221,"released_at":222},103126,"v0.20.6","## What's Changed\r\n* Use base URL of GitLab for the `\u002Fuploads` URLs by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1482\r\n* Bump version to v0.20.6 by @iterative-olivaw in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1485\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fcompare\u002Fv0.20.5...v0.20.6","2024-10-24T14:38:37",{"id":224,"version":225,"summary_zh":226,"released_at":227},103127,"v0.20.5","## What's Changed\r\n* Include \"dotfiles\" in `cml pr create .` by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1481\r\n* Bump micromatch from 4.0.5 to 4.0.8 by @dependabot in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1473\r\n* Bump ws from 7.5.9 to 7.5.10 by @dependabot in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1468\r\n* Fix `terraform` install commands by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1483\r\n* Bump version to v0.20.5 by @iterative-olivaw in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1484\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fcompare\u002Fv0.20.4...v0.20.5","2024-10-24T01:28:23",{"id":229,"version":230,"summary_zh":231,"released_at":232},103128,"v0.20.4","## What's Changed\r\n* Pin @npcz\u002Fmagic to 1.3.12 by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1465\r\n* Bump version to v0.20.4 by @iterative-olivaw in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1466\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fcompare\u002Fv0.20.3...v0.20.4","2024-05-28T03:02:40",{"id":234,"version":235,"summary_zh":236,"released_at":237},103129,"v0.20.3","## What's Changed\r\n* Fix CML version on container images by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1460\r\n* Bump version to v0.20.2 by @iterative-olivaw in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1461\r\n* Exit 1 after TensorBoard deprecation notice by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1462\r\n* Bump version to v0.20.3 by @iterative-olivaw in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1463\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fcompare\u002Fv0.20.1...v0.20.3","2024-05-11T02:35:56",{"id":239,"version":240,"summary_zh":241,"released_at":242},103130,"v0.20.2","## What's Changed\r\n* Fix CML version on container images by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1460\r\n* Bump version to v0.20.2 by @iterative-olivaw in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1461\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fcompare\u002Fv0.20.1...v0.20.2","2024-05-11T02:35:44",{"id":244,"version":245,"summary_zh":246,"released_at":247},103131,"v0.20.1","## What's Changed\r\n* Use repository variables for non-sensitive fields by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1427\r\n* pin last `vega-lite` version to support node16 by @dacbd in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1429\r\n* Quote `$GITHUB_HEAD_REF` on `release.yml` by @h2oa in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1448\r\n* Add exclusion list for environment variables by @DavidGOrtega in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F802\r\n* Fix flawed `unist-util-visit` usage by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1447\r\n* Cleanup project files by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1449\r\n* Fix CML by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1450\r\n* Delete .github\u002FISSUE_TEMPLATE\u002Fepic-or-story.md by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1458\r\n* Rename GitLab self-hosted test job by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1459\r\n\r\n## New Contributors\r\n* @h2oa made their first contribution in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1448\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fcompare\u002Fv0.20.0...v0.20.1","2024-05-10T02:40:44",{"id":249,"version":250,"summary_zh":251,"released_at":252},103132,"v0.20.0","## What's Changed\r\n* Update CUDA on container images by @dacbd in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1405\r\n* additional cuda updates by @dacbd in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1406\r\n* fix: replace deprecated gitlab ci var by @nipierre in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1404\r\n* Bump word-wrap from 1.2.3 to 1.2.4 by @dependabot in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1402\r\n* Bump semver from 7.3.7 to 7.5.2 by @dependabot in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1400\r\n* Bump tough-cookie from 4.0.0 to 4.1.3 by @dependabot in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1399\r\n* runner: Convert idle-timeout=\"never\" to 0 with GitLab driver by @BradyJ27 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1408\r\n* [Snyk] Upgrade tar from 6.1.11 to 6.1.15 by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1397\r\n* [Snyk] Upgrade node-fetch from 2.6.7 to 2.6.11 by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1395\r\n* [Snyk] Upgrade semver from 7.5.2 to 7.5.4 by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1411\r\n* [Snyk] Upgrade yargs from 17.5.1 to 17.7.2 by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1394\r\n* [Snyk] Upgrade winston from 3.8.1 to 3.10.0 by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1414\r\n* Bump version to v0.20.0 by @dacbd in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1419\r\n\r\n## New Contributors\r\n* @BradyJ27 made their first contribution in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1408\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fcompare\u002Fv0.19.1...v0.20.0","2023-08-25T17:48:26",{"id":254,"version":255,"summary_zh":256,"released_at":257},103133,"v0.19.1","## What's Changed\r\n* Updates for dvc 3.0 release. by @dacbd in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1388\r\n* Handle dvclive's embedded base64 by @dacbd in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1390\r\n* Bump version to v0.19.1 by @0x2b3bfa0 in https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fpull\u002F1391\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fiterative\u002Fcml\u002Fcompare\u002Fv0.19.0...v0.19.1","2023-06-21T21:52:44"]