faint-cat-74485
01/10/2025, 2:50 PMfaint-cat-74485
01/10/2025, 2:51 PMfaint-cat-74485
01/10/2025, 2:52 PMfaint-cat-74485
01/10/2025, 2:55 PMfrom flytekit import task, workflow
from flytekit.remote import FlyteRemote
from flytekit.configuration import Config
@task
def launch_subworkflow_async():
remote = FlyteRemote(config=Config.auto())
launch_plan = remote.fetch_launch_plan(name="subworkflow_launch_plan")
execution = remote.execute(launch_plan, inputs={"num_samples": 10})
# Do not wait for the execution to complete
@workflow
def parent_workflow() -> str:
launch_subworkflow_async()
return "Subworkflow launched asynchronously"
average-finland-92144
01/10/2025, 4:05 PM@eager
would let you run an async task without blocking the main workflow
https://docs.flyte.org/en/latest/user_guide/advanced_composition/eager_workflows.html
This is beta but making strides to GA soonfaint-cat-74485
01/10/2025, 4:12 PMaverage-finland-92144
01/10/2025, 4:16 PM1.10
clean-glass-36808
01/10/2025, 4:38 PMthankful-minister-83577
thankful-minister-83577
thankful-minister-83577
faint-cat-74485
01/10/2025, 4:59 PMthankful-minister-83577
@workflow(failure_policy=WorkflowFailurePolicy.FAIL_AFTER_EXECUTABLE_NODES_COMPLETE)