Is it possible to start a local execution from a l...
# flyte-support
e
Is it possible to start a local execution from a launch plan (rather than directly invoking the workflow)? If so, is there a documentation link for this?
For context, we're trying to figure out how to get a tighter iteration loop when working on dynamic workflows. it's been a bit onerous to actually need to run it in the cluster to debug, and we can't take advantage of the full static type-checking since we're using dynamic to specify launch-plan dependent resource overrides
f
you should be able to run dynamic locally as well right?
and ofcourse launchplans can be executed locally
e
Is there an example of executing a launchplan locally in the docs/would you be able to provide an example?
f
hmm
e
I couldn't find anything when I looked recently, but certainly could have missed something
Copy code
my_fixed_lp = LaunchPlan.get_or_create(
    name="always_2_lp", workflow=my_wf, fixed_inputs={"val": 2}
)
square_2 = my_fixed_lp()
# error:
# square_1 = my_fixed_lp(val=1)
e
ah, so
get_or_create
just returns a callable?
f
yup
e
Cool! Thanks -- will give this a try
f
as you can even embed launchplans in workflows
its like subworkflows
and also call them locally
e
oh I didn't realize that, that's neat
f
ohh man and you are still a power user haha
please help improve docs
cc @broad-monitor-993 / @tall-lock-23197 - Rahul did not realize that you can run launchplans locally and also use it in workflows
e
Thanks @freezing-airport-6809, appreciate it
t
[flyte-docs]
e
This is really powerful - we're going to bake this into our bazel target so users can run the workflow locally to test, and then add the
--remote
flag to serialize/deploy to the cluster
Along with our typing improvements that solves most of our local devx concerns
🔥 2
b
@tall-lock-23197 gonna fold this into the new getting started guide
👍 1
161 Views