Differences between dvc repro and dvc status


#1

Is it guaranteed that if dvc status Dvcfile shows: nothing to reproduce, the dvc repro Dvcfile will not do anything ?

For my use case, it looks like dvc repro (even when there is nothing to reproduce) takes more time to run than dvc status. I could then switch to calling dvc status to find out if there’s nothing to reproduce and have a faster pipeline.


#2

Hi @tmain !

Sorry for a late response.

Is it guaranteed that if dvc status Dvcfile shows: nothing to reproduce, the dvc repro Dvcfile will not do anything ?

Yes, it is indeed guaranteed.

For my use case, it looks like dvc repro (even when there is nothing to reproduce) takes more time to run than dvc status . I could then switch to calling dvc status to find out if there’s nothing to reproduce and have a faster pipeline.

Repro works in a bit different way than the status does so there might be differences in processing time. Sorry, I’m not sure I follow, could you please elaborate on what you mean by switch?

Thanks,
Ruslan


#3

By switch I meant the following.

In order to find out whether I need to repro something, I used to call dvc repro Dvcfile --dry and parse the output of that command. If I got Nothing to reproduce, I would continue without calling dvc repro Dvcfile.

Now instead, I can do dvc status Dvcfile, find out whether there is something to reproduce, and call dvc repro Dvcfile if there is.


#4

Ah, got it. Thank you for clarifying! Indeed, dvc status was intended to be used precisely for checking if anything in your pipeline has changed and requires reproduction. And repro --dry is actually intended for visualizing the order and list of the commands that will be run in order to reproduce the pipeline :slight_smile: