CLI Reference¶
Kale ships a single kale command-line entry point, declared as
[project.scripts] in pyproject.toml. It compiles (and optionally runs) a
notebook against Kubeflow Pipelines.
kale¶
The primary CLI. Parses a notebook, builds the pipeline DAG, compiles it to KFP v2 DSL, and optionally uploads and runs it.
kale --nb path/to/notebook.ipynb [options]
General options¶
Flag |
Type |
Description |
|---|---|---|
|
str |
Path to the source notebook. Required. |
|
flag |
Upload the compiled pipeline to KFP. |
|
flag |
Upload and then create a KFP run. |
|
flag |
Enable verbose logging. |
|
flag |
Bake a local devpi index URL into generated components. |
|
str |
Comma-separated PEP 503 simple indexes baked into components. |
|
str |
Devpi simple URL (used when |
Notebook metadata overrides¶
All the flags in this group override the corresponding fields in the notebook’s Kale metadata. If both are set, the CLI value wins.
Flag |
Description |
|---|---|
|
KFP experiment name. Default: |
|
Name of the deployed pipeline. Default: |
|
Description shown in the KFP UI. |
|
Default base image for every step. |
|
KFP API endpoint, as |
|
Storage class for pipeline-created volumes. |
|
Access mode for pipeline-created volumes. |
Examples¶
Compile only, leave the generated script in .kale/:
kale --nb examples/base/candies_sharing.ipynb
Compile, upload, and run on a local KFP port-forward:
kale --nb examples/base/candies_sharing.ipynb \
--kfp_host http://127.0.0.1:8080 \
--run_pipeline
Override pipeline naming:
kale --nb notebooks/my_pipeline.ipynb \
--pipeline_name "weekly-churn" \
--experiment_name "production" \
--run_pipeline --kfp_host http://127.0.0.1:8080
Environment variables¶
A few environment variables affect kale:
Variable |
Effect |
|---|---|
|
Default KFP API endpoint when |
|
KFP UI URL used when rendering run links. |
|
Comma-separated list of pip indexes baked into generated components. |
|
Trusted hosts for HTTP pip indexes (required when using HTTP URLs). |
|
Equivalent to passing |
|
Equivalent to |
See Running Pipelines for concrete scenarios where these are useful.