question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support calling DVC with output path as alternative to stage path

See original GitHub issue

Hi guys, just an idea, what if you could also use file.txt just like file.txt.dvc when calling all DVC commands?

Since DVC already checks that a single file cannot be an output of multiple stages, its stage is uniquely defined and can be retrieved automatically. Both ways could be supported, the user could call DVC the way they prefer: dvc repro file.txt or dvc repro file.txt.dvc.

The motivation is:

  • file.txt appears before file.txt.dvc when using tab expansion 😃
  • when working with files, my focus point is the output file rather than the DVC file

The main problems that come to mind:

  • for stages with multiple outputs, all of them would be reproduced/pushed/pulled. But is that too surprising?
  • it might be confusing when the file is not present yet - you could still use dvc pull file.txt, but you would have to know the filename.
  • it might be confusing that you can call DVC both ways

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
dmpetrovcommented, Feb 16, 2019

@efiop stage name could be optional. Or we can use corresponding command as a replacement for a name.

1reaction
efiopcommented, Dec 4, 2018

Hi @prihoda !

Thank you for detailed analysis, it is great! All three problems can be mitigated with appropriate warning messages, that would let user know that something is happening. I see no reason why we can’t or shouldn’t support this behavior. We’ll take a look at implementing this soon.

Thanks, Ruslan

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Add Dependencies or Outputs to a Stage
To add dependenciesdependencies or outputsoutputs to a stage, edit the dvc.yaml file (by hand or using dvc stage add with the -f flag)....
Read more >
Using Guild AI with DvC - General
Guild's DvC integration supports two scenarios: Run DvC stages as Guild operations; Define dependencies on DvC managed files using either ...
Read more >
DVC - Pipeline Versioning - Laziness makes Great Engineer
DVC only provides a way to display values in file organized as tree hierarchies and compare them throughout different git commits. Copy $...
Read more >
'Automating' DVC stage generation
Any of the stages that I add to my dvc.yaml file will be a separate file in this folder. This allows me to...
Read more >
How to Version Gigabyte-Sized Datasets Just Like Code ...
DVC project is initialized on top of a Git repo with dvc init · You should set up a remote for the project...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found