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 no-command meta stages

See original GitHub issue

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 bare dvc 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 its md5 but does not run any command or produce outputs.

  • If implicit behavior without cmd is undesirable, require cmd, but allow it to be YAML null:

    cmd: null
    

    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:

  • If my pipeline will only be used on *nix systems, use cmd: 'true'.
  • Use another no-op command, like cmd: python -V; it works, but it’s a bit weird and doesn’t clearly communicate the intent of the stage.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mdekstrandcommented, Nov 22, 2021

I could see it being useful to have a way to configure a group of stages to run, but:

  • As you mention, you can already do this with no-op stages, so it doesn’t seem high priority.
  • As you also mention, no-op stages don’t clearly communicate the intent. I don’t think the proposed solution seems much clearer in communicating this intent. In either case, you could add a comment to the meta-stage to describe the intent.

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.

Can this be achieved with dvc repro --all-pipelines?

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 😃.

1reaction
mdekstrandcommented, Nov 16, 2021

There are two use cases I have:

  • Grouping stages. Globs in repro can help with this, but are less convenient, particularly if the stages to group are split across multiple subdirectories (each with its own dvc.yaml), and/or may change from time to time. Defined meta-stages allows you to document things like “run dvc repro dataprep to ensure data preparation is up to date”, and just keep the meta-stage dataprep definition up to date to ensure the instructions keep working.
  • Top-level stages. When running dvc repro without arguments in a project root, it reproduces all stages in the root dvc.yaml; stages defined in dvc.yaml files in subdirectories don’t get reproduced unless something in the root dvc.yaml depends on one of their outputs. Putting a meta-stage in the top-level dvc.yaml would provide an easy way to include those outputs in a no-argument dvc repro run.

The second of these is currently my more common use case, but I have felt the need for the first from time to time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

6.4. Resource Meta Options Red Hat Enterprise Linux 7
Table 6.3, “Resource Meta Options” describes these options. ... This command sets the failure-timeout meta option to 20 seconds, so that the resource...
Read more >
US Army Reserve Command
No Change from Base Order. (3) Operational, Functional, Training and Supporting Commands. (a) (CHANGE) Identify personnel to attend the DHAP Train the ...
Read more >
FAQ: What meta-analysis features are available in Stata?
The following meta-analysis commands are all described in Meta-Analysis in Stata: An Updated Collection from the Stata Journal, Second Edition.
Read more >
Meta | Red vs. Blue Wiki | Fandom
Eventually, in Chapter 14, the Meta climbs on the back of a tank driven by the Reds, Blues, and Wash to infiltrate command....
Read more >
Introduction to Meta-Analysis in Stata - OARC Stats - UCLA
Look at the help file for the command that you will be using. For this workshop, we will be using the meta analysis...
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