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

commit, status: cannot address all foreach stage targets #7323

Closed
davesteps opened this issue Jan 31, 2022 · 6 comments · Fixed by #8210
Closed

commit, status: cannot address all foreach stage targets #7323

davesteps opened this issue Jan 31, 2022 · 6 comments · Fixed by #8210
Labels
A: cli Related to the CLI A: pipelines Related to the pipelines feature p1-important Important, aka current backlog of things to do ui user interface / interaction

Comments

@davesteps
Copy link

davesteps commented Jan 31, 2022

I have a pipeline that uses a foreach loop to process different datasets lets call the stage data_prep. I can run dvc repro -s data_prep and it will loop through each dataset specified in the dvc.yaml no problem. If I then modify the code that the stage depends eg data_prep.py all the individual stages will need to be rerun IE dvc status will return something like:

data_prep@data_set_1:
        changed deps:
                modified:           ./data_prep.py
data_prep@data_set_2:
        changed deps:
                modified:           ./data_prep.py
data_prep@data_set_3:
        changed deps:
                modified:           ./data_prep.py
data_prep@data_set_4:
        changed deps:
                modified:           ./data_prep.py
...

The problem is that lets say all I have done is a minor change to the code and I don't want to do a dvc repro all I want to do is dvc commit data_prep but I cannot, I have to commit each substage separtely eg dvc commit data_prep@data_set_4 which is not ideal as I have many such datasets. Can it be implemented that doing a dvc commit data_prep will commit all sub-stages?

Many thanks, DVC is awesome.

Edit: I also do not want to just to a dvc commit to commit everything as there are later stages I don't want to commit

@dberenbaum dberenbaum added the A: pipelines Related to the pipelines feature label Feb 1, 2022
@dberenbaum
Copy link
Collaborator

Good point! This appears to be supported for dvc repro data_prep but not for dvc commit data_prep.

@skshetry Any thoughts on this?

@itcarroll
Copy link

itcarroll commented Feb 3, 2022

I'm also encountering this, and would add that dvc status <target> fails in the same way as dvc commit <target> when <target> is a foreach stage.

@dtrifiro Thanks for your help. I found this already existing issue.

@dtrifiro
Copy link
Contributor

dtrifiro commented Feb 4, 2022

Thanks @itcarroll! I'd expect the all commands dealing with parametrized stages to work in a consistent manner (i.e. like repro does). It wouldn't be bad to have this fixed

@dtrifiro dtrifiro added ui user interface / interaction A: cli Related to the CLI labels Feb 4, 2022
@pmrowla pmrowla changed the title dvc commit stage when using foreach in dvc.yaml commit, status: cannot address all foreach stage targets Feb 15, 2022
@dberenbaum dberenbaum added the p1-important Important, aka current backlog of things to do label Feb 16, 2022
@dberenbaum dberenbaum added this to DVC Mar 17, 2022
@dberenbaum dberenbaum moved this to Backlog in DVC Mar 17, 2022
@dberenbaum
Copy link
Collaborator

dberenbaum commented Mar 22, 2022

Support for foreach targets should be extended to:

  • commit
  • status
  • push
  • pull
  • fetch
  • checkout
  • remove
  • dag
  • stage list
  • repro
  • exp run

@itcarroll
Copy link

@dberenbaum And remove?

@dberenbaum dberenbaum removed this from DVC May 17, 2022
@dberenbaum
Copy link
Collaborator

@skshetry There was interest in contributing a fix in #7462 (comment). What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: cli Related to the CLI A: pipelines Related to the pipelines feature 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.

4 participants