metaflow icon indicating copy to clipboard operation
metaflow copied to clipboard

Addition of conditional branching of Tasks

Open thesillystudent opened this issue 5 years ago • 5 comments

Pull request for adding the functionality of branching of tasks based on a condition.

The following changes are made -

  1. With the already existing implementation, a join operation is checked if there is an extra parameter passed to the function. But a join task for split-or takes only one input, the input from the branch being run. Hence another function traverse_fix_split_or is run after split_or to fix the graph.
  2. Conditions are added for scheduling of out tasks of split-or and the scheduling of split-or join.

thesillystudent avatar Dec 26 '19 20:12 thesillystudent

@thesillystudent Thanks for the PR. Conditional branching is kind of a mine-field in the sense that it makes reasoning about workflows (and state transitions) non-trivial for users. Do you have specific instances of workflows that necessarily require conditional branching?

savingoyal avatar Jan 27 '20 19:01 savingoyal

@savingoyal I have a few use cases which I'm currently using. Let's take the case of model invocation. Suppose if the result of model-1 is +ve then I may want to run some more steps, like maybe invoking some other models. But if the result of model-1 is -ve I want to move to the end.

thesillystudent avatar Feb 19 '20 09:02 thesillystudent

@savingoyal I have a few use cases which I'm currently using. Let's take the case of model invocation. Suppose if the result of model-1 is +ve then I may want to run some more steps, like maybe invoking some other models. But if the result of model-1 is -ve I want to move to the end.

Hi @thesillystudent Do you have any information about merging this PR? I'm creating a Data pipeline where I need conditional branching, it will be good to have this feature in the nearest future.

hovhanns avatar Jun 23 '21 13:06 hovhanns

@hovhanns I don’t have any plans as such. I can complete it over some weekends if enough people ask for it and I get a goahead from the devs

thesillystudent avatar Jun 24 '21 15:06 thesillystudent

@thesillystudent I am converting this PR to draft since there is no immediate need for this functionality. Please reach out to us at slack.outerbounds.co if you would like to work on this PR.

savingoyal avatar Jan 07 '22 19:01 savingoyal