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

dvc: replace pipeline with dag #3905

Merged
merged 1 commit into from May 31, 2020
Merged

dvc: replace pipeline with dag #3905

merged 1 commit into from May 31, 2020

Conversation

efiop
Copy link
Member

@efiop efiop commented May 28, 2020

pipeline list is no more, it had some very questionable applications
(none to be precise) and was duplicating old pipeline show functionality.
We might introduce a different command to assist in listing (e.g. for
shell completion) in the future.

New dvc dag replaces dvc pipeline show and by-default will show
all pipelines in the project in ASCII (so there is no more --ascii)
and also --dot support, just like before. When given a target,
dvc dag (in any mode) will show DAG that leads to the target,
skipping the descendants, unless --full is specified.

Example commands:

dvc dag  # shows all pipelines in the project in ascii format
dvc dag --dot
dvc dag --vega (not implemented, just an idea on how it could be expanded in the future if we need to)
dvc dag mystage
dvc dag mystage --full

Fixes #3661
Fixes #2392

iterative/dvc.org#1383

  • ❌ I will check DeepSource, CodeClimate, and other sanity checks below. (We consider them recommendatory and don't expect everything to be addressed. Please fix things that actually improve code or fix bugs.)

Thank you for the contribution - we'll try to review it as soon as possible. 🙏

@efiop efiop changed the title pipeline: redesign list and show [WIP] pipeline: redesign list and show May 28, 2020
dvc/command/pipeline.py Outdated Show resolved Hide resolved
@efiop
Copy link
Member Author

efiop commented May 28, 2020

Had a discussion with @shcheklein and we came up with an idea to maybe rename it to dvc dag. E.g.

dvc dag
dvc dag --tree
dvc dag --dot
dvc dag --vega (theoretically in the future)
dvc dag mystage
dvc dag mystage --full
dvc dag --commands
dvc dag --outs

@efiop efiop changed the title [WIP] pipeline: redesign list and show [WIP] dvc: replace pipeline with dag May 29, 2020
dvc/command/dag.py Outdated Show resolved Hide resolved
@drorata
Copy link

drorata commented May 29, 2020

I have two questions:

  • What's the role of Dvcfile in the context of dvc dag?
  • Is dvc dag mystage --full the same as dvc dag --full? And what about simply dvc dag? In this context, what about the case where the DAG have multiple connected components? I would argue that dvc dag and dvc dag --full would both return all components while dvc dag mystage --full should return the whole connected component containing mystage.

@efiop
Copy link
Member Author

efiop commented May 29, 2020

@drorata Thank you for the questions!

What's the role of Dvcfile in the context of dvc dag?

None, it is no longer the default target.

Is dvc dag mystage --full the same as dvc dag --full?

If you only have 1 pipeline in your project, then yes, those will be the same and would be the same as dvc dag(no arguments).

And what about simply dvc dag?

It will show you all the pipelines you have in your project in ASCII format.

In this context, what about the case where the DAG have multiple connected components? I would argue that dvc dag and dvc dag --full would both return all components while dvc dag mystage --full should return the whole connected component containing mystage.

Correct, dvc dag and dvc dag --full will show the same thing: your whole DAG (all pipelines). And dvc dag mystage --full will show the whole pipeline that this stage belongs too.

Here is an example with two pipelines in the project: asciicast

`pipeline list` is no more, it had some very questionable applications
(none to be precise) and was duplicating old `pipeline show` functionality.
We might introduce a different command to assist in listing (e.g. for
shell completion) in the future.

New `dvc dag` replaces `dvc pipeline show` and by-default will show
all pipelines in the project in ASCII (so there is no more --ascii)
and also `--dot` support, just like before. When given a target,
`dvc dag` (in any mode) will show DAG that leads to the target,
skipping the descendants, unless `--full` is specified.
@efiop efiop changed the title [WIP] dvc: replace pipeline with dag dvc: replace pipeline with dag May 31, 2020
@efiop efiop merged commit d1e08b6 into iterative:master May 31, 2020
@efiop efiop deleted the fix-2392 branch May 31, 2020 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants