Once flows are defined, they can be launched using the Flyte CLI through a Workspace or Job. Flows can also be relaunched from the UI once they have been registered into Domino.
A new flow must be launched using the Flyte CLI via the pyflyte run
command.
We assume that:
-
A flow is defined inside a
workflow.py
file. -
The flow is defined using a method called
test_workflow
. -
The flow takes two input arguments called
inputA
(int) andinputB
(string).
Therefore, the following command can be used to run the flow:
pyflyte run --remote workflow.py test_workflow --inputA 5 --inputB "Hello"
The above command can be executed inside a Workspace terminal or as the start command for a Job. Once it is executed, the flow is automatically registered and execution should start immediately.
After a flow has been triggered for the first time, it can be relaunched in a number of ways directly through the UI.
Recover from failure
If a task fails due to unexpected transient issues (job timed out, out-of-capacity issues, spot instance pre-emption, internal server error, etc.), it is possible to continue execution from the point of failure rather than restarting the entire flow execution from the beginning.
When this happens, you can click the Recover button of the execution view in the Domino Flows UI. This will resume the execution from the point of failure by re-using the cached results that have already been computed.
Note
| This capability is meant for transient issues only. If an execution has failed due to a user error in the code, you must relaunch the flow from the CLI after making your changes so that a new version of the code can be registered. |
Rerun a single task
During experimentation, you may be focused on specific parts of the flow and want to execute just a single task with different input parameters. To do this in Flows:
-
Click on the relevant task in the Flyte UI, then click Rerun.
-
Specify the parameters accordingly and click Launch.
Note
|
The format field must be filled in if the input type was originally defined with a format.
|
Note
| Relaunching flows through the UI only works in scenarios where the flow definition has not changed. If changes are being made to the original flow definition, they must be launched through the CLI so that a new version can be registered. |
Once you have properly launched the flow, learn how to monitor flow results.