Hi, I need some help forcing a linear dependency b...
# ask-community
p
Hi, I need some help forcing a linear dependency between my tasks:
Copy code
execution_id = task_run_inference()
task_decision_process(execution_id, config, upstream_tasks=[task_run_inference])

    task_append_to_m2m(execution_id, config, upstream_tasks=[task_decision_process])

    task_append_to_m2r(execution_id, config, upstream_tasks=[task_decision_process])

    task_run_inference_cleanup(execution_id, config, upstream_tasks=[task_append_to_m2r, task_append_to_m2m])
This is returning a weird dependency plot where task_run_inference is pointing to task_append_to_m2r. Do I need to explicitly set all tasks as upstream? wont this create a dependency between them?
1
a
I'd guess that you want something like this:
Copy code
execution_id = task_run_inference()

t2 = task_decision_process(execution_id, config)

t3 = task_append_to_m2m(execution_id, config, upstream_tasks=[t2])

t4 = task_append_to_m2r(execution_id, config, upstream_tasks=[t3])

task_run_inference_cleanup(execution_id, config, upstream_tasks=[t4])
upvote 1
p
And do I need to have a return value for each of those tasks?
Or can I just do it as null?
a
No, you don't.
p
Thanks! Your solution return this plot. I thought the result would be linear, visually. The relationships look okay, though..
Seems like the file wasn't updated 😄 it looks good
🎉 1