salmon-flower-36598
10/08/2024, 5:34 PMjolly-florist-66728
10/08/2024, 5:34 PMflytectl get launchplan -p flytesnacks -d development myapp.workflows.example.my_wf --execFile exec_spec.yaml
2. Update the input spec file for arguments to the workflow:
inputs:
name: "adam"
3. Create execution using the exec spec file:
flytectl create execution -p flytesnacks -d development --execFile exec_spec.yaml
4. Monitor the execution by providing the execution id from the create command:
flytectl get execution -p flytesnacks -d development <execid>
Using FlyteRemote Python SDK
1. Initialize FlyteRemote and fetch the launch plan:
from flytekit.remote import FlyteRemote
from flytekit.configuration import Config
from flytekit import LaunchPlan
remote = FlyteRemote(
config=Config.for_endpoint(endpoint="flyte.example.net"),
default_project="flytesnacks",
default_domain="development",
)
flyte_lp = remote.fetch_launch_plan(
name="workflows.example.wf", version="v1", project="flytesnacks", domain="development"
)
2. Execute the launch plan:
execution = remote.execute(
flyte_lp, inputs={"mean": 1}, execution_name="lp-execution", wait=True
)
For more details, refer to the Flytectl documentation and the FlyteRemote documentation.
Would you like more detail on any specific part?
Sources:
- Running launch plans 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.