Skip to main content

KubeFlow Pipelines SDK

Project description

kfp: Kubeflow Pipelines SDK

PyPI Package version PyPI Python Version PyPI Downloads Documentation Status Code Style

Kubeflow Pipelines is a platform for building and deploying portable, scalable machine learning workflows based on Docker containers within the Kubeflow project.

Use Kubeflow Pipelines to compose a multi-step workflow (pipeline) as a graph of containerized tasks using Python code and/or YAML. Then, run your pipeline with specified pipeline arguments, rerun your pipeline with new arguments or data, schedule your pipeline to run on a recurring basis, organize your runs into experiments, save machine learning artifacts to compliant artifact registries, and visualize it all through the Kubeflow Dashboard.

Documentation

Installation

To install the latest stable release, run:

pip install kfp

Getting started

The following is an example of a simple pipeline with one Python function-based component used in two separate tasks to do basic addition:

import kfp
from kfp.components import create_component_from_func
import kfp.dsl as dsl

def add(a: float, b: float) -> float:
    '''Calculates sum of two arguments'''
    return a + b


# create a component using the add function
add_op = create_component_from_func(add)

# compose your pipeline using the dsl.pipeline decorator
@dsl.pipeline(
    name='Addition pipeline',
    description='An example pipeline that performs addition calculations.')
def add_pipeline(
    a: float=1.0,
    b: float=7.0,
):
    first_add_task = add_op(a=a, b=4.0)
    second_add_task = add_op(a=first_add_task.output, b=b)

# instantiate a client and submit your pipeline with arguments
client = kfp.Client(host='<my-host-url>')
client.create_run_from_pipeline_func(
    add_pipeline, arguments={
        'a': 7.0,
        'b': 8.0
    })

For more information, refer to Building Python function-based components.

Release history Release notifications | RSS feed

Download files

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

Source Distribution

kfp-1.8.15.tar.gz (304.5 kB view details)

Uploaded Source

File details

Details for the file kfp-1.8.15.tar.gz.

File metadata

  • Download URL: kfp-1.8.15.tar.gz
  • Upload date:
  • Size: 304.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.12

File hashes

Hashes for kfp-1.8.15.tar.gz
Algorithm Hash digest
SHA256 ea2c56b95132ceca9447a3effb4953b1617aa05502d2f49665e9b0f7a9c72161
MD5 2f847d44c015a7b0f5d88cdc40ae0b40
BLAKE2b-256 ec46cecd9a8b94600aedc882ad76a04e2d7114bac1b67aab742e555840f5d28d

See more details on using hashes here.

Provenance

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