Quick question about using dynamic workflows with ...
# announcements
m
Quick question about using dynamic workflows with the imperative style
create_node()
. We have a bunch of
@tasks
which have dependencies on one another, but they are not explicit (nothing is returned or passed in). We can easily use the imperative style to define the order of the tasks in a regular
@workflow
. Does the imperative style also work for
@dynamic
workflows?
s
Hello @Mike Zhong!
create_node()
works with
@dynamic
. It doesn’t work locally cause a dynamic workflow is treated as a task during a local execution; however, it should work on the sandbox and Flyte backend. cc: @Yee, should we add the support for local runs?
y
oh sorry missed this. yes we should try to add support for local runs, though i’m not sure how feasible that is. it’s not easy because for the basic imperative case, you start out by declaring an
ImperativeWorkflow
object. In the dynamic case, I’m not sure how you’d distinguish between a normal task and an imperative one.
the execution pattern is completely different.
also not sure how tested the imperative in dynamic is… did you test it samhita? i feel like there might be issues.
s
I believe @Mike Zhong is referring to
create_node()
but not the actual
ImperativeWorkflow
. I tested this specific use case out by including
create_node()
within
@dynamic
. It didn’t work locally but worked on sandbox. If we’re talking about
ImperativeWorkflow
, are you asking if we’ve tested this locally as a dynamic workflow? How will we do that?
y
no sorry i just mean using create node.
s
Yeah, so it didn’t work locally but sandbox is all good.
y
i wonder if it’s possible to be able to create an imperative workflow inside a dynamic task, and then () it
something will probably break… too corner of a case
m
thanks for the info, I had tried it locally before and it didn’t work but if it works with remote execution, that is good enough
177 Views