Skip to main content

kfp local client runs pipelines on local host or in docker container

Project description

kfp-local

Pipelines built with kfp(kubeflow pipeline) execute in k8s cluster.

During the development of kubeflow pipeline components, we usually upload the pipeline to kfp server and run it in k8s, if anything wrong we fix it locally and upload it again.

It should be helpful for the development efficiency if the above process takes place in local host, that's what kfp-local cares.

Installation

pip install kfp-local

Usage

from kfp_local import LocalClient

local_client = LocalClient()
result = local_client.create_run_from_pipeline_func(
            pipeline_func,
            arguments={"foo": "bar"},
            execution_mode=LocalClient.ExecutionMode("local"),
        )
if result.success:
    a_output_filepath = result.get_output_file(task_name="a-task", output="a_output_name")

Additional configuration

The demo code in Usage executes pipeline in local process with ExecutionMode('local'), ExecutionMode controls how the pipline executes.

There are some options of ExecutionMode:

  • mode: Default execution mode, default 'docker'

  • images_to_exclude: If the image of op is in images_to_exclude, the op is executed in the mode different from default_mode.

  • tasks_to_exclude: If the name of task is in tasks_to_exclude, the op is executed in the mode different from default_mode.

  • docker_options: Docker options used in docker mode, e.g. docker_options=["-e", "foo=bar"].

For more information about how to make use of kfp_local, please refer to unit test.

kfp compatibility

kfp-local is tested with kfp>=1.8.9,<2.0 for now.

Supports:

  • Control flow: Condition, ParallelFor, ExitHandler
  • Data passing: InputPath, OutputPath, Input

Don't support for now:

  • Importer
  • Artifact iterator
  • Caching

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kfp-local-1.1.0.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

kfp_local-1.1.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file kfp-local-1.1.0.tar.gz.

File metadata

  • Download URL: kfp-local-1.1.0.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.13

File hashes

Hashes for kfp-local-1.1.0.tar.gz
Algorithm Hash digest
SHA256 118463dd41db5b17eb4efbb5abe0fcd326e320f1c1b8122bd0c3f40bb935caa1
MD5 f1b38c6c53a46e5522ace0d52d751301
BLAKE2b-256 f61dfcb72e8c5c88289034489c98db92ff8214076cfd3d0d301df1ef1c0105cb

See more details on using hashes here.

File details

Details for the file kfp_local-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: kfp_local-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.13

File hashes

Hashes for kfp_local-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a994bbd32e88e38bddb5b233ed17043860914cef703171f3e01bbb11ff13783e
MD5 087da5c08cfbeee688c1d681696bcd75
BLAKE2b-256 6f7ca071db6273b6e2e88b10246cc730a67b44e4dc0df6649b3074bad9af59ce

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page