How to automate DVC push

Hello

I have started using DVC for version control in one of my projects and it’s awesome.

Currently, the model training job is executed from an amazon ec2 machine and the output is downloaded to my local machine which is pushed to the remote storage using the DVC push command.

My doubt is, is it possible to programmatically push the model into the remote DVC storage (Amazon S3)? I couldn’t find any helping articles online. Could you please suggest the right way of doing the same?

Thanks in advance

You can automate this process with git hooks, provided by dvc install. See https://dvc.org/doc/command-reference/install

So when you install this pre-push hook, it will run dvc push before every git push.

2 Likes

Note: alternative discussion in https://groups.google.com/u/1/a/iterative.ai/g/support/c/Bk43iyFOq4M/m/Y290XdCMDgAJ (in case needed). Cheers

2 Likes

For the record, it looks like the dvc import-url --to-remote may satisfy this need. (WIP, currently in https://github.com/iterative/dvc/pull/5198).