Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove one of many stage outputs: misleading error message #4497

Closed
dmpetrov opened this issue Aug 30, 2020 · 3 comments · Fixed by #5236
Closed

remove one of many stage outputs: misleading error message #4497

dmpetrov opened this issue Aug 30, 2020 · 3 comments · Fixed by #5236
Labels
p1-important Important, aka current backlog of things to do ui user interface / interaction

Comments

@dmpetrov
Copy link
Member

Users cannot remove a data file if it is only one output of many for a stage. It is a valid behavior that needs a better error message:

$ dvc remove model.h5
ERROR: failed to remove 'model.h5' - "Stage 'model.h5' not found inside 'dvc.yaml' file"

The pipeline:

$ cat dvc.yaml
stages:
  train:
    cmd: python train.py
    deps:
    - users.csv
    - train.py
    - mymodel.py
    params:
    - epochs
    - opt
    - log_file
    - dropout
    outs:
    - logs
    - model.h5       # <-- trying to remove this one
    metrics:
    - summary.json:
        cache: false
    plots:
    - logs.csv:
        cache: false
@dmpetrov dmpetrov added the ui user interface / interaction label Aug 30, 2020
@dmpetrov
Copy link
Member Author

Also, formatting issues:

  1. The prefix failed to remove 'model.h5' - is not needed. Too obvious.
  2. Quoted error message "Stage 'model.h5' not ..."

@efiop efiop added the p1-important Important, aka current backlog of things to do label Sep 3, 2020
@skshetry
Copy link
Member

skshetry commented Jan 8, 2021

@dmpetrov, we don't support removing a .dvc file by its output name yet. The target should be either a .dvc file or a name of the stage.

@efiop
Copy link
Contributor

efiop commented Jan 13, 2021

skshetry pushed a commit that referenced this issue Jan 19, 2021
…ntrol (#4497) (#5236)

* cli: remove: fix error message for the case when file is not under control (#4497)

* cli: remove: fix error message for the case when file is not under control (#4497)

fixes after code review

* cli: remove: fix error message for the case when file is not under control (#4497)

2nd round of fixes after code review

* cli: remove: fix error message for the case when file is not under control (#4497)

3rd round of fixes after code review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p1-important Important, aka current backlog of things to do ui user interface / interaction
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants