LEIP Pipeline
LEIP Pipeline is a single command or Python function call, that allows you to execute one or more LEIP tasks sequentially, operating on one or more models, and where the input of each task may be the output of a previous task. The definition of each task and its configuration parameters is provided through a file in YAML or JSON format. This lets you easily group all the configuration of commands that you want to apply to your models, and easily share it with anyone to run.
The configuration file is organized as a list of tasks. Each task defines its input source, options for a model, and options for an operation among Optimize, Compile, Package, Evaluate, Run, and Zoo Download.
Variables in Configuration
Any string value in the configuration of a LEIP Pipeline task may contain variables, which get replaced by a value before executing the task. The types of variables are:
1. $VAR{<var-name>}
or $<var-name>
: a variable provided as environment variable or in the pipeline call.
Example: $VAR{model_id}
or $model_id
.
2. $TASK_OUTPUT{<task-name>:<task-type>}
: output path of a previous task. Example: $TASK_OUTPUT{myname:compile}
.
CLI Usage
The basic command is:
leip pipeline --input_path inputModel/ \
--output_path pipelineOutputs/ \
--config_path config.yaml
Here, the --input_path
argument maps to the $VAR{input_path}
variable in the configuration.
For a detailed explanation of each option see the CLI Reference for LEIP Pipeline.
If you choose to use JSON for your configuration file, we’ve provided a JSON schema for you to download:
If you choose to use YAML, we have provided some examples for you to follow: