Once flows are defined, they can be registered and 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.
In the example below, 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 directly through the UI. To relaunch an existing flow:
-
Navigate to Flows > Flow name > Run name and click Re-run from the top-right corner of the page.
-
Provide a name for the new run and choose whether to overwrite caching. For more details on caching, see the Advanced Flows section.
-
Choose whether to reuse the latest inputs or enter new input parameters, then click on Launch Run to trigger the relaunch.
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 outputs 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 node
During experimentation, you may be focused on specific parts of the flow and want to execute just a single node with different input parameters. To do this in Flows:
-
Navigate to the relevant node in the execution view of the Domino UI, and click Rerun Node.
-
Provide a name for the new run and choose whether to overwrite caching. For more details on caching, see the Advanced Flows section.
-
Choose whether to reuse the latest inputs or enter new input parameters. Then click on Launch Run to trigger the relaunch of the node.
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.