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.

run: improve ERROR message for existing 'Dvcfile'

See original GitHub issue

Try

$ echo abc > file.txt
$ dvc run -d file.txt cat file.txt
# ^ creates Dvcfile
$ echo qwerty > qwerty.txt
$ dvc run -d qwerty.txt cat qwerty.txt
'Dvcfile' already exists. Do you wish to run the command and overwrite it? [y/n] n
ERROR: failed to run command - stage 'Dvcfile' already exists

My suggestion is to add a sentence to the error message above for this case: Use -f option to specify a different stage name (ending in '.dvc').

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
efiopcommented, Jun 18, 2019

@jorgeorpinel

p.s. how hard would it be to use the base name of the first argument to the command as the fallback default stage name? In this case qwerty.dvc?

It is not hard at all, but the idea was that it should correspond either to the function or to the output. If we start using dependencies as well, it is easy to see how dvc add qwerty + dvc -d qwerty ... might get us into an even worse position.

1reaction
efiopcommented, Oct 19, 2020

No longer relevant with the new dvc.yaml design. E.g. now it will fail with

ERROR: Stage 'mystage' already exists in 'dvc.yaml'. Use '--force' to overwrite.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting | Data Version Control - DVC
Users may encounter errors when running dvc pull and dvc fetch , like WARNING: Cache 'xxxx' not found. or ERROR: failed to pull...
Read more >
Easy way to update existing DVC-file for "run" stage #3102
I often need to update existing dvc file (say train.dvc) for run stage with some minor changes like slightly modifying the cmd section, ......
Read more >
How do launch experiments in DVC? - Stack Overflow
I solved my problem. It is necessary, that all files (executable scripts, 'dvc.yaml', 'params.yaml') be tracked by git. In this case dvc exp ......
Read more >
shcheklein/example-get-started: Get started DVC project
Python 3.7+ is required to run code from this repo. $ git clone https://github.com/iterative/example-get-started $ cd ...
Read more >
DVC - Visual Studio Marketplace
Run, compare, visualize, and track machine learning experiments right in VS Code. This extension uses DVC, an open-source data versioning and ML ...
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