是否需要从我们的 CI 管道提交 DVC 文件?

Is it necessary to commit DVC files from our CI pipelines?

DVC 使用 git 提交来保存实验并在实验之间导航。

是否可以避免在 CI/CD 中进行自动提交(以在 CI/CD 端保存 dvc repro 之后的数据工件)。

will you make it part of CI pipeline

DVC 通常作为 MLOps 基础设施的一部分。有一个流行的 blog post about CI/CD for ML where DVC is used under the hood. Another example 但有 GitLab CI/CD.

scenario where you will integrate dvc commit command with CI pipelines?

如果你的意思是 git commit 个 DVC 文件(不是 dvc commit)那么是的,你需要在 CI/CD 过程中将 dvc 文件提交到 Git。自动提交不是最佳实践。

如何避免 Git 在 CI/CD 中提交:

  1. 在 CI/CD 中训练 ML 模型后,将更改的 dvc 文件保存在外部存储中(例如 GitLab artifact/releases),然后将文件获取到开发人员机器并提交那里。用户通常编写脚本来自动化它。
  2. 等待 DVC 1.0 发布,届时 run-cache (like build-cache) 将实施。 运行-cache 使 dvc 文件变得短暂,并且不需要额外的 Git 提交。从技术上讲,运行-缓存是 Git 存储库(在数据远程中)之外的关联存储 repo state --> run results

免责声明:我是 DVC 的创建者之一。