Skip to main content

Kubeflow Python SDK to manage ML workloads and to interact with Kubeflow APIs.

Project description

Kubeflow SDK

PyPI version PyPI Downloads Join Slack Coverage Status Ask DeepWiki

Overview

Kubeflow SDK is a unified Python SDK that streamlines the user experience for AI Practitioners to interact with various Kubeflow projects. It provides simple, consistent APIs across the Kubeflow ecosystem, enabling users to focus on building ML applications rather than managing complex infrastrutcure.

Kubeflow SDK Benefits

  • Unified Experience: Single SDK to interact with multiple Kubeflow projects through consistent Python APIs
  • Simplified AI Workflows: Abstract away Kubernetes complexity, allowing AI practitioners to work in familiar Python environments
  • Seamless Integration: Designed to work together with all Kubeflow projects for end-to-end ML pipelines
  • Local Development: First-class support for local development requiring only pip installation
Kubeflow SDK Personas

Get Started

Install Kubeflow SDK

pip install git+https://github.com/kubeflow/sdk.git@main

Run your first PyTorch distributed job

from kubeflow.trainer import TrainerClient, CustomTrainer

def get_torch_dist():
    import os
    import torch
    import torch.distributed as dist

    dist.init_process_group(backend="gloo")
    print(f"PyTorch Distributed Environment")
    print(f"WORLD_SIZE: {dist.get_world_size()}")
    print(f"RANK: {dist.get_rank()}")
    print(f"LOCAL_RANK: {os.environ['LOCAL_RANK']}")

# Create the TrainJob
job_id = TrainerClient().train(
    runtime=TrainerClient().get_runtime("torch-distributed"),
    trainer=CustomTrainer(
        func=get_torch_dist,
        num_nodes=3,
        resources_per_node={
            "cpu": 2,
        },
    ),
)

# Wait for TrainJob to complete
TrainerClient().wait_for_job_status(job_id)

# Print TrainJob logs
print(TrainerClient().get_job_logs(name=job_id, node_rank=0)["node-0"])

Supported Kubeflow Projects

Project Status Description
Kubeflow Trainer Available Train and fine-tune AI models with various frameworks
Kubeflow Katib 🚧 Planned Hyperparameter optimization
Kubeflow Pipelines 🚧 Planned Build, run, and track AI workflows
Kubeflow Model Registry 🚧 Planned Manage model artifacts, versions and ML artifacts metadata

Community

Getting Involved

Contributing

Kubeflow SDK is a community project and is still under active development. We welcome contributions! Please see our CONTRIBUTING Guide for details.

Documentation

✨ Contributors

We couldn't have done it without these incredible people:

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

kubeflow_test-0.7.0.tar.gz (546.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kubeflow_test-0.7.0-py3-none-any.whl (37.4 kB view details)

Uploaded Python 3

File details

Details for the file kubeflow_test-0.7.0.tar.gz.

File metadata

  • Download URL: kubeflow_test-0.7.0.tar.gz
  • Upload date:
  • Size: 546.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for kubeflow_test-0.7.0.tar.gz
Algorithm Hash digest
SHA256 15ea2e60265bc987d3c306992fc1477c73e9ceea7d948a0f70c9d2baa76f8d6e
MD5 afe3807495ad3aebc8d69d5278eaefc1
BLAKE2b-256 d37b74610945d9d4f3f6c1fba5c9b4d4c4fcf8487a3ecca3caa84e34e0922857

See more details on using hashes here.

Provenance

The following attestation bundles were made for kubeflow_test-0.7.0.tar.gz:

Publisher: release.yaml on kramaranya/sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kubeflow_test-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: kubeflow_test-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 37.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for kubeflow_test-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 def7d61fe16239421c53bf9c05352106fc1ef449576e0370e626da0dddbc36db
MD5 524ad5341f89e38a0ec681660a432fdc
BLAKE2b-256 4b1f337bc4489686cfca9483c0a5fda2e32ce3ed5b3899bbe2c2dbf16d74bff9

See more details on using hashes here.

Provenance

The following attestation bundles were made for kubeflow_test-0.7.0-py3-none-any.whl:

Publisher: release.yaml on kramaranya/sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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