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

Allow pipeline to create pipeline #4213

Closed
MatthieuBizien opened this issue Jul 15, 2020 · 4 comments
Closed

Allow pipeline to create pipeline #4213

MatthieuBizien opened this issue Jul 15, 2020 · 4 comments
Labels
feature request Requesting a new feature p3-nice-to-have It should be done this or next sprint research

Comments

@MatthieuBizien
Copy link

Like #3549 say, "A run of a pipeline is like a function call". Based on that analogy, we can't right now call a function from another function: f(g(x)) doesn't make any sense for the current dvc model. As discussed in #331, it would allow to use very flexible workflows by allowing to dynamically created pipelines.

Some potential applications:

A possible interface could be:

  • dvc run could specify a yaml file to use, instead of dvc.yml
  • We allow that file to the output of another pipeline step
  • Then dvc run -n "create_pipe" -o generated_pipe.yml generate_pipe.sh would create the generated_pipe.yml file, and dvc repro -c generated_pipe.yml would execute all the steps dynamically defined.
@triage-new-issues triage-new-issues bot added the triage Needs to be triaged label Jul 15, 2020
@skshetry
Copy link
Member

Without the generation overhead, we could introduce depends_on key in dvc.yaml, but it might not be straightforward,
as we create a pipeline based on relationship of outputs-dependencies which might easily create cyclic graph.

stages:
   stage1:
     ...
   stage2:
    depends_on: stage1
    ...

@dmpetrov
Copy link
Member

The first implementation is coming #4734. The next step is #331.

Let's close this issue and move all the discussions to "umbrella" issues #3633 & #331.

@MatthieuBizien
Copy link
Author

Thanks for #4734, it address one of the major limitation of DVC! But this issue is about something different, more powerful, so I don't think it should be closed.

@efiop
Copy link
Contributor

efiop commented Oct 20, 2020

@MatthieuBizien Have you considered the alternative approach that @skshetry suggested? For now we are not sure if we will ever allow dynamic generation like you've suggested, as there are alternatives like parametrization or generating the whole pipeline programmatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requesting a new feature p3-nice-to-have It should be done this or next sprint research
Projects
None yet
Development

No branches or pull requests

4 participants