Support no-command meta stages #7022
Replies: 6 comments
-
|
Beta Was this translation helpful? Give feedback.
-
There are two use cases I have:
The second of these is currently my more common use case, but I have felt the need for the first from time to time. |
Beta Was this translation helpful? Give feedback.
-
@dberenbaum What do you think of this? Although In my previous work I just use |
Beta Was this translation helpful? Give feedback.
-
Interesting idea. Your use cases make sense, but I think it's worth considering other ways to achieve managing complex stage groupings.
I could see it being useful to have a way to configure a group of stages to run, but:
Can this be achieved with |
Beta Was this translation helpful? Give feedback.
-
That's fair. And the most self-documenting would be to create some kind of 'finalize' script that reports something meaningful but brief, and use that as a command.
Yes, it can (provided that all stages are wanted, and not just some of them). Somehow I missed that as a prospective solution. If you want to close this, it's fine - can make things work with these solutions, and it's only affecting the potential ergonomics of my pipelines, not my ability to specify the pipelines I need. Just thought I'd suggest it to raise discussion about the use cases and in case others might find it useful as well :). |
Beta Was this translation helpful? Give feedback.
-
Thanks for the explanation and follow-up, @mdekstrand! I'm going to convert to a discussion and see if others follow up with additional needs or ideas here. |
Beta Was this translation helpful? Give feedback.
-
I would find it very useful to be able to define a DVC stage that has inputs but no command or outputs. The use case is to create meta-stages that serve only to depend on other stages, either to provide convenient ways to run part of the pipeline, or in the top-level
dvc.yaml
to make a baredvc repro
reproduce outputs defined in subdirectories.I see two options to enable this that shouldn't cause conflict with existing pipelines:
Support a stage without a
cmd
entry; such a stage checks its inputs and updates itsmd5
but does not run any command or produce outputs.If implicit behavior without
cmd
is undesirable, requirecmd
, but allow it to be YAMLnull
:This will make it explicit in the
dvc.yaml
file that this stage does not have a command.I currently have two workarounds for this lack:
cmd: 'true'
.cmd: python -V
; it works, but it's a bit weird and doesn't clearly communicate the intent of the stage.Beta Was this translation helpful? Give feedback.
All reactions