Available in
latch >= 2.62.0
- Call the workflow with Python parameter values.
- Use a
LaunchPlan
from a previously registered workflow.
Pre-requisites
- Please make sure you have registered your workflow to Latch using
latch register
. This creates a new workflow version, which you will reference in your script.
Usage
- Using Python parameter values
- Using a previously registered LaunchPlan
wf_name:
Name of the workflow function. This is the function defined immediately after the@workflow
decorator in your code (Example)version
: Workflow version registered on Latchparams
: Dictionary of parameter names and values. If the python values are not typed using the exact same types used in the workflow function signature (including the module paths), thebest_effort
parameter should be set toTrue
.best_effort
(default True): (available inlatch >= 2.67.8
) When set toTrue
, allows for flexible conversion of params to workflow inputs. This enables launching workflows outside of the workflow environment with compatible values (e.g., strings for enums where the string matches an enum option, or dictionaries/dataclasses with all the fields of a particular dataclass).
Important note on Python version: If the Python version in the workflow’s
Docker image does not match the Python version running the script that calls
launch
or launch_from_launch_plan,
the function may fail with a dill
unpickling error. In this case, it is recommended to use the same Python
version used during workflow registration.