Does anyone know why Flyte workflows always seem t...
# ask-the-community
f
Does anyone know why Flyte workflows always seem to have unnecessary connections between tasks? Like A -> B -> C, but also A -> C
d
can you elaborate? maybe a code example, i'm really not following. this is just the transitive property, if c depends on b and b depends on a then c will always execute after a right?
f
Yes, it is just a bit annoying to see that extra line in the DAG visualization... Would look much cleaner if the transitive dependency would not be shown
d
oh sure, my understanding is that the UI displays the exact task-level dependencies. for example:
Copy code
@task
def task_a() -> (int, int):
    # ...

@task
def task_b(m: int) -> int:
    # ...

@task
def task_c(n: int, l: int) -> int:
    # ...

@workflow
def wf() -> int:
    x, y = task_a()
    z = task_b(m=x)
    return task_c(n=y, l=z)
would create exactly what you mentioned. is that not the case? or do you want to UI to automatically remove the a->c line because it's redundant?
f
yeah, would be nice if the UI would not show the redundant lines... not sure if they are needed in the backend...
k
Why is it redundant
I guess the lines are showing where data feeds from
Cc @Tim Sheiner
d
IMO it would be more confusing to remove the line.
f
simple example where the extra lines are a bit confusing:
t
@Felix Ruess have I correctly labeled the 'extra' lines in your example?
f
yes
t
I will log this as an issue to track it, discuss it internally, and get back to you when I have a clearer understanding of the logic and rationale for the current implementation.
148 Views