Skip to main content

17 posts tagged with "DVC"

DVC (Data Version Control), Versioning Large Data Files and Machine Learning Models Alongside Git

View All Tags

End-to-End MLOps Tutorial in Python — Part 2: Version Data and Models with DVC

· 47 min read
Jagdish Kumawat
Founder @ Dewiride

In Part 1, Git kept the code and the settings, but it ignored the data and the model, so no commit could say which data a model learned from or which model it made. In this part you put both under version control with DVC: every commit now names its exact data and model, and any earlier version comes back with two commands.

Fixed: dvc status Says a Model Is "modified" After Retraining with the Same Data

· 11 min read
Jagdish Kumawat
Founder @ Dewiride

After I retrained a model with the same data and the same settings, dvc status reported modified: models/model.skops, although every metric came out exactly the same. The model was the same; the file wasn't, because skops writes a new file every time it saves. Comparing the two models' predictions proved it, and dvc checkout --force put the committed file back.

Fixed: "Can't remove the following unsaved files without confirmation" in dvc checkout

· 7 min read
Jagdish Kumawat
Founder @ Dewiride

dvc checkout refused to put back the committed version of a model, with ERROR: Can't remove the following unsaved files without confirmation. Use --force to force. The model file in the project had changes that DVC had never saved, and replacing it would have lost them for good. dvc add keeps such changes, and dvc checkout --force throws them away.

How to Find a DVC-Tracked File in the DVC Cache

· 9 min read
Jagdish Kumawat
Founder @ Dewiride

DVC keeps every version of your data in its cache, but not under the names you gave the files: each file is named after its MD5 hash. Once you know that, you can find any tracked file in the cache in a few seconds. This guide finds a tracked file and a tracked folder in the cache with DVC 3.67.1, checks that the cached copy is the same file, and shows why you can't edit it.

How to Install DVC with uv

· 7 min read
Jagdish Kumawat
Founder @ Dewiride

DVC (Data Version Control) is a Python package, so uv can install it in two ways: into one project, with its version pinned in the project's uv.lock, or once for your user account, as a dvc command that works in every folder. This guide does both with DVC 3.67.1 and uv 0.13.10, and says which one to pick.

How to Save a New Version of a DVC-Tracked File

· 8 min read
Jagdish Kumawat
Founder @ Dewiride

When a file DVC tracks changes, the change isn't saved anywhere yet: the .dvc file still points to the old version. Saving the new one takes three commands: dvc add, git commit and dvc push. This guide adds a customer to a tracked CSV file, saves the new version with DVC 3.67.1, and shows that the old version is still kept.

How to Compare Data Versions with dvc diff

· 7 min read
Jagdish Kumawat
Founder @ Dewiride

git diff on a .dvc file shows only that a hash changed. dvc diff tells you which data files were added, modified or deleted, even inside a tracked folder. This guide compares the project folder with the last commit, then two commits, then prints the result as a Markdown table, with DVC 3.67.1.

How to See Which DVC-Tracked Files Changed with dvc status

· 8 min read
Jagdish Kumawat
Founder @ Dewiride

Change a file that DVC tracks, and git status says nothing: Git only sees the small .dvc file, and that hasn't changed. dvc status compares the data itself with the hash in its .dvc file. This guide changes a tracked file, reads what dvc status and dvc data status report, then deletes the file and gets it back with dvc checkout, using DVC 3.67.1.