名称: dvc-数据集版本控制 描述: 使用DVC进行数据集版本控制的技能,用于跟踪数据变更、管理数据管道并确保机器学习工作流程的可复现性。 允许使用的工具:
- 读取
- 写入
- Bash
- Glob
- Grep
dvc-数据集版本控制
概述
使用DVC(数据版本控制)进行数据集版本控制的技能,用于跟踪数据变更、管理数据管道并确保机器学习工作流程中的可复现性。
核心能力
- 数据集版本跟踪
- 数据管道定义与执行
- 远程存储管理(S3、GCS、Azure等)
- 可复现性强制执行
- 数据血缘追踪
- 结合数据版本进行实验比较
- 大型数据集的缓存管理
目标流程
- 数据收集与验证管道
- 机器学习模型重训练管道
- 特征存储实现
工具与库
- DVC
- Git
- 远程存储SDK(boto3、google-cloud-storage等)
输入模式
{
"type": "object",
"required": ["action"],
"properties": {
"action": {
"type": "string",
"enum": ["init", "add", "push", "pull", "diff", "checkout", "run", "repro"],
"description": "要执行的DVC操作"
},
"paths": {
"type": "array",
"items": { "type": "string" },
"description": "要跟踪的文件或目录路径"
},
"remote": {
"type": "string",
"description": "远程存储名称"
},
"revision": {
"type": "string",
"description": "用于检出/差异比较的Git修订版本"
},
"pipeline": {
"type": "object",
"description": "用于run操作的数据管道阶段定义"
}
}
}
输出模式
{
"type": "object",
"required": ["status", "action"],
"properties": {
"status": {
"type": "string",
"enum": ["success", "error"]
},
"action": {
"type": "string"
},
"trackedFiles": {
"type": "array",
"items": { "type": "string" }
},
"changes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": { "type": "string" },
"status": { "type": "string" },
"hash": { "type": "string" }
}
}
},
"remote": {
"type": "object",
"properties": {
"name": { "type": "string" },
"url": { "type": "string" },
"syncStatus": { "type": "string" }
}
}
}
}
使用示例
{
kind: 'skill',
title: '版本化训练数据集',
skill: {
name: 'dvc-dataset-versioning',
context: {
action: 'add',
paths: ['data/train.csv', 'data/test.csv'],
remote: 's3-bucket'
}
}
}