Overview
DVC is designed to work seamlessly with Git, enabling teams to collaborate on ML projects just like software projects. While Git tracks code and metadata, DVC tracks data, models, and pipeline outputs.The key to DVC collaboration: Git tracks
.dvc files, while DVC remote storage holds the actual data.The Collaboration Workflow
1
Initial setup
The first team member initializes the project:
2
Team members clone
Other team members clone and get data:
3
Make changes
Team members work independently:
4
Review and merge
Team reviews and merges changes:
Sharing Data
Adding New Data
When you add data to the project:Updating Existing Data
DVC automatically versions your data. Old versions remain in the cache and remote storage.
Sharing Pipelines
Creating a Pipeline
One team member creates a pipeline:Running a Shared Pipeline
Team members reproduce the pipeline:Sharing Experiments
Push Experiments to Git Remote
Pull Team Members’ Experiments
Branch-Based Collaboration
Feature Branch Workflow
- Developer 1
- Developer 2
Merging Branches
Handling Merge Conflicts
Conflicts in .dvc Files
When two branches modify the same data:1
Choose the version you want
Edit the file to keep one version or combine them.
2
Re-run the pipeline
3
Commit resolved conflict
Conflicts in params.yaml
Working with Data Versions
Switch to a Previous Data Version
Compare Data Across Branches
Team Best Practices
Always push data
Run
dvc push after git push to ensure team members can access your dataPull before starting work
Run
git pull && dvc pull to get the latest code and dataUse feature branches
Create branches for experiments and features, merge to main when ready
Document pipelines
Add descriptions to stages with
--desc for team clarityShare experiments
Push experiments with
dvc exp push origin --all so the team can reviewAutomate with CI/CD
Set up CI/CD to run
dvc repro and validate pipelines automaticallySetting Up CI/CD
GitHub Actions Example
.github/workflows/train.yml
GitLab CI Example
.gitlab-ci.yml
Multi-Team Scenarios
Data Science Team + Engineering Team
1
Data science team
2
Engineering team
Regional Teams with Different Data
Access Control
Read-Only Access
Give some team members read-only access:Separate Credentials
Each team member uses their own credentials:Troubleshooting Collaboration Issues
Data not found after git pull
Data not found after git pull
Remember to run Or combine them:
dvc pull after git pull:Merge conflicts in dvc.lock
Merge conflicts in dvc.lock
Usually safe to accept one version and re-run:
Outdated cache
Outdated cache
If cache is out of sync:
Permission errors
Permission errors
Check remote credentials:
Complete Team Workflow Example
1
Project lead initializes
2
Data engineer adds data
3
ML engineer builds pipeline
4
Team runs experiments
5
Team reviews results
Next Steps
CI/CD Integration
Automate your ML workflows with continuous integration
Command Reference
Explore all DVC commands for advanced collaboration