Created
February 13, 2019 13:13
-
-
Save IanCal/24abd1a9f956fa33748891da125035f9 to your computer and use it in GitHub Desktop.
A minimal example of DVC not using the cache
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
rm -rf test_example | |
mkdir test_example | |
cd test_example | |
echo "Setup DVC" | |
dvc init --no-scm | |
echo "Add our basic input file" | |
echo "v1" > input | |
dvc add input | |
echo "Now setup a basic pipeline, just copy the file" | |
dvc run -d input -o output cp input output | |
echo "dvc status shows all good and up to date" | |
dvc status | |
echo "Now let's update the input" | |
echo "v2" > input | |
echo "Check DVC knows to update" | |
dvc status | |
echo "Recalculate our output" | |
dvc repro output.dvc | |
cat output | |
echo "Now go back to the original file contents" | |
echo "v1" > input | |
echo "Identifies something that needs rerunning" | |
dvc status | |
echo "This I want to *not* rerun, but use the cached data" | |
dvc repro output.dvc | |
cat output | |
cd ../ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment