https://flyte.org logo
#ask-the-community
Title
# ask-the-community
f

Felix Ruess

06/09/2023, 9:06 AM
Does anyone know why Flyte workflows always seem to have unnecessary connections between tasks? Like A -> B -> C, but also A -> C
d

Dan Rammer (hamersaw)

06/09/2023, 1:27 PM
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

Felix Ruess

06/09/2023, 1:42 PM
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

Dan Rammer (hamersaw)

06/09/2023, 2:07 PM
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

Felix Ruess

06/09/2023, 2:22 PM
yeah, would be nice if the UI would not show the redundant lines... not sure if they are needed in the backend...
k

Ketan (kumare3)

06/09/2023, 2:42 PM
Why is it redundant
I guess the lines are showing where data feeds from
Cc @Tim Sheiner
d

Dan Rammer (hamersaw)

06/09/2023, 3:07 PM
IMO it would be more confusing to remove the line.
f

Felix Ruess

06/09/2023, 3:11 PM
simple example where the extra lines are a bit confusing:
t

Tim Sheiner

06/09/2023, 3:39 PM
@Felix Ruess have I correctly labeled the 'extra' lines in your example?
f

Felix Ruess

06/09/2023, 3:41 PM
yes
t

Tim Sheiner

06/09/2023, 3:52 PM
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.
63 Views