Builds reproducible ML pipelines: DVC for data/model versioning, MLflow for experiment tracking and serving, and Kubeflow Pipelines for orchestration.
Agentic Workflow: Read -> Reason -> Act (ai-ml-pipeline)
You are ai-ml-pipeline (data) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — data context for ai-ml-pipeline
- Domain: Builds reproducible ML pipelines: DVC for data/model versioning, MLflow for experiment tracking and serving, and Kubeflow Pipelines for orchestration.
- data-versioning: Track datasets and model artifacts with DVC so training runs reproduce from any git commit. —
dvc init
- experiment-tracking: Log parameters, metrics, and models with MLflow and serve models as REST endpoints. —
mlflow run . -P alpha=0.5
- pipeline-orchestration: Package and run component pipelines on Kubeflow Pipelines. —
kubectl apply -f pipeline.yaml
- Check
knowledge and prerequisites: python, scikit-learn, tensorflow, mlflow
2. Reason — think for ai-ml-pipeline
- For
data-versioning: Track datasets and model artifacts with DVC so training runs reproduce from any git commit. — decide which checks to run
- For
experiment-tracking: Log parameters, metrics, and models with MLflow and serve models as REST endpoints. — decide which checks to run
- For
pipeline-orchestration: Package and run component pipelines on Kubeflow Pipelines. — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with ai-ml-pipeline tools
- Tools:
Glob, Grep, Read, Dvc, Mlflow (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
ai-ml-pipeline:5bbd5080
AI/ML Pipeline
What this skill does
Creates reproducible ML pipelines: DVC versions raw data and model artifacts, MLflow tracks experiments and serves models, and Kubeflow Pipelines orchestrates training end to end.
When to use
- Reproducing a training run from a git commit
- Tracking hyperparameters/metrics without spreadsheets
- Deploying an ML training workflow to Kubernetes
Real commands
# Version training data
dvc init
dvc add data/train.csv
git add data/train.csv.dvc .dvc/config
git commit -m "add training data"
# Reproduce pipeline stages
dvc repro
# Track an experiment
mlflow run . -P alpha=0.5 -P batch_size=64
# Compare metric deltas
dvc metrics diff --sort-by=accuracy
# Serve a model
mlflow models serve -m runs:/<run-id>/model -p 5000
dvc.yaml pipeline
stages:
featurize:
cmd: python featurize.py
deps:
- data/train.csv
outs:
- features.pkl
train:
cmd: python train.py --params params.yaml
deps:
- features.pkl
metrics:
- metrics.json
Testing
- Run
dvc repro on a clean clone to verify reproducibility
- Add a CI job running
dvc metrics diff --branch main that fails when accuracy drops
Best practices
- Never commit binaries into git; DVC stores them in remote storage
- Pin Python deps so runs are deterministic
- Log a params snapshot in MLflow for every run
- Set
dvc remote add to S3/GCS for team sharing
Capabilities
data-versioning
Track datasets and model artifacts with DVC so training runs reproduce from any git commit.
Parameters:
stage (string): DVC stage file (e.g. train.dvc) to reproduce
targets (string): Space-separated stages for dvc repro
Commands:
dvc init
dvc add data/train.csv
dvc repro
dvc push
dvc metrics show
Examples:
- dvc add data/train.csv && git add data/train.csv.dvc .dvc/config && git commit -m 'add training data'
- dvc repro train.dvc
- dvc metrics diff --sort-by=accuracy
experiment-tracking
Log parameters, metrics, and models with MLflow and serve models as REST endpoints.
Parameters:
experiment (string): MLflow experiment name or ID
run_id (string): Run ID used to reference a registered model
params (string): Hyperparameters passed with -P key=value
Commands:
mlflow run . -P alpha=0.5
mlflow experiments create --experiment-name ab-test
mlflow models serve -m runs:/demo-run-id/model -p 5000
mlflow ui --host 0.0.0.0 --port 5000
Examples:
- mlflow run . -P alpha=0.5 -P batch_size=64
- mlflow models serve -m runs:/abc123/model -p 5000
- mlflow experiments list
pipeline-orchestration
Package and run component pipelines on Kubeflow Pipelines.
Parameters:
pipeline_file (string): Path to the compiled pipeline YAML/JSON
run_id (string): Pipeline run identifier for logs
Commands:
kubectl apply -f pipeline.yaml
kfp pipeline upload
kubectl get pods -n kubeflow -l pipeline-sdk-type=component
kubectl logs -l pipeline-run-id=demo-run-id --all-containers
Examples:
- kfp pipeline upload --name iris-pipeline pipeline.yaml
- kubectl logs -n kubeflow -l pipeline-run-id=run-123 --tail=200
- kubectl get experiments.pipelines.kubeflow.org
References
1---2name: "ai-ml-pipeline"3description: "Builds reproducible ML pipelines: DVC for data/model versioning, MLflow for experiment tracking and serving, and Kubeflow Pipelines for orchestration. Use when working with data versioning, experiment tracking, pipeline orchestration or when the user mentions data versioning, experiment tracking, pipeline orchestration."4license: "MIT"5compatibility: "Requires python, scikit-learn, tensorflow, mlflow, kubeflow. Needs network access."6metadata:7 source: https://skillmd.com/skills/opknock/ai-ml-pipeline8 author: Kdesk9 version: 2.0.010 category: data11allowed-tools: "Glob Grep Read Bash(dvc:*) Bash(kfp:*) Bash(kubectl:*) Bash(mlflow:*)"12---1314Builds reproducible ML pipelines: DVC for data/model versioning, MLflow for experiment tracking and serving, and Kubeflow Pipelines for orchestration.1516## Agentic Workflow: Read -> Reason -> Act (ai-ml-pipeline)1718You are **ai-ml-pipeline** (data) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — data context for `ai-ml-pipeline`21- Domain: Builds reproducible ML pipelines: DVC for data/model versioning, MLflow for experiment tracking and serving, and Kubeflow Pipelines for orchestration.22- **data-versioning**: Track datasets and model artifacts with DVC so training runs reproduce from any git commit. — `dvc init`23- **experiment-tracking**: Log parameters, metrics, and models with MLflow and serve models as REST endpoints. — `mlflow run . -P alpha=0.5`24- **pipeline-orchestration**: Package and run component pipelines on Kubeflow Pipelines. — `kubectl apply -f pipeline.yaml`25- Check `knowledge` and `prerequisites: python, scikit-learn, tensorflow, mlflow`2627### 2. Reason — think for `ai-ml-pipeline`28- For `data-versioning`: Track datasets and model artifacts with DVC so training runs reproduce from any git commit. — decide which checks to run29- For `experiment-tracking`: Log parameters, metrics, and models with MLflow and serve models as REST endpoints. — decide which checks to run30- For `pipeline-orchestration`: Package and run component pipelines on Kubeflow Pipelines. — decide which checks to run31- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3233### 3. Act — execute with `ai-ml-pipeline` tools34- Tools: `Glob`, `Grep`, `Read`, `Dvc`, `Mlflow` (see frontmatter `tools`/`allowed-tools`)35- Use `safe_path` for any write; record evidence (paths, checksums)36- Fingerprint: `ai-ml-pipeline:5bbd5080`3738# AI/ML Pipeline3940## What this skill does4142Creates reproducible ML pipelines: DVC versions raw data and model artifacts, MLflow tracks experiments and serves models, and Kubeflow Pipelines orchestrates training end to end.4344## When to use4546- Reproducing a training run from a git commit47- Tracking hyperparameters/metrics without spreadsheets48- Deploying an ML training workflow to Kubernetes4950## Real commands5152```bash53# Version training data54dvc init55dvc add data/train.csv56git add data/train.csv.dvc .dvc/config57git commit -m "add training data"5859# Reproduce pipeline stages60dvc repro6162# Track an experiment63mlflow run . -P alpha=0.5 -P batch_size=646465# Compare metric deltas66dvc metrics diff --sort-by=accuracy6768# Serve a model69mlflow models serve -m runs:/<run-id>/model -p 500070```7172## dvc.yaml pipeline7374```yaml75stages:76 featurize:77 cmd: python featurize.py78 deps:79 - data/train.csv80 outs:81 - features.pkl82 train:83 cmd: python train.py --params params.yaml84 deps:85 - features.pkl86 metrics:87 - metrics.json88```8990## Testing9192- Run `dvc repro` on a clean clone to verify reproducibility93- Add a CI job running `dvc metrics diff --branch main` that fails when accuracy drops9495## Best practices9697- Never commit binaries into git; DVC stores them in remote storage98- Pin Python deps so runs are deterministic99- Log a params snapshot in MLflow for every run100- Set `dvc remote add` to S3/GCS for team sharing101102## Capabilities103104### data-versioning105Track datasets and model artifacts with DVC so training runs reproduce from any git commit.106107**Parameters:**108- `stage` (string): DVC stage file (e.g. train.dvc) to reproduce109- `targets` (string): Space-separated stages for dvc repro110111**Commands:**112- `dvc init`113- `dvc add data/train.csv`114- `dvc repro`115- `dvc push`116- `dvc metrics show`117118**Examples:**119- dvc add data/train.csv && git add data/train.csv.dvc .dvc/config && git commit -m 'add training data'120- dvc repro train.dvc121- dvc metrics diff --sort-by=accuracy122123### experiment-tracking124Log parameters, metrics, and models with MLflow and serve models as REST endpoints.125126**Parameters:**127- `experiment` (string): MLflow experiment name or ID128- `run_id` (string): Run ID used to reference a registered model129- `params` (string): Hyperparameters passed with -P key=value130131**Commands:**132- `mlflow run . -P alpha=0.5`133- `mlflow experiments create --experiment-name ab-test`134- `mlflow models serve -m runs:/demo-run-id/model -p 5000`135- `mlflow ui --host 0.0.0.0 --port 5000`136137**Examples:**138- mlflow run . -P alpha=0.5 -P batch_size=64139- mlflow models serve -m runs:/abc123/model -p 5000140- mlflow experiments list141142### pipeline-orchestration143Package and run component pipelines on Kubeflow Pipelines.144145**Parameters:**146- `pipeline_file` (string): Path to the compiled pipeline YAML/JSON147- `run_id` (string): Pipeline run identifier for logs148149**Commands:**150- `kubectl apply -f pipeline.yaml`151- `kfp pipeline upload`152- `kubectl get pods -n kubeflow -l pipeline-sdk-type=component`153- `kubectl logs -l pipeline-run-id=demo-run-id --all-containers`154155**Examples:**156- kfp pipeline upload --name iris-pipeline pipeline.yaml157- kubectl logs -n kubeflow -l pipeline-run-id=run-123 --tail=200158- kubectl get experiments.pipelines.kubeflow.org159160## References161- [DVC Documentation](https://dvc.org/doc)162- [MLflow Docs](https://mlflow.org/docs/latest/index.html)163- [Kubeflow Pipelines](https://www.kubeflow.org/docs/components/pipelines/)