Prada Souvanlasy
07/13/2022, 11:32 AM@dynamic
workflow, is there a way to define dependencies between tasks without relying on their respective outputs? i.e, we would like to run task2()
after task1()
even though the latter does not output anything.
In a classic @workflow
, we could rely on create_node()
+ >>
but can't figure out the equivalent for @dynamic
Ketan (kumare3)
Prada Souvanlasy
07/13/2022, 2:07 PMCannot use explicit run to call Flyte entities workflows.test.task1
Rémy Dubois
07/13/2022, 2:17 PM@task
def task1():
print("1")
@task
def task2():
print("2")
@task
def task3():
print("3")
@dynamic
def dynamic_wf() -> str:
node_1 = create_node(
task1
)
node_2 = create_node(
task2
)
node_3 = create_node(
task3
)
node_3 >> node_2
node_1 >> node_2
return "Done"
@workflow
def wf2() -> str:
return dynamic_wf()
pyflyte run file.py wf2
Ketan (kumare3)
Rémy Dubois
07/13/2022, 3:06 PMEduardo Apolinario (eapolinario)
07/13/2022, 3:07 PMcreate_node
in @dynamic
in local executions.
This works in a remote setting.Rémy Dubois
07/13/2022, 3:51 PMEduardo Apolinario (eapolinario)
07/13/2022, 3:52 PMKetan (kumare3)
Eduardo Apolinario (eapolinario)
07/13/2022, 5:32 PMRémy Dubois
07/13/2022, 5:42 PMKetan (kumare3)