Kubeflow Python SDK to manage ML workloads and to interact with Kubeflow APIs.
Project description
Kubeflow SDK
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
pipinstallation
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
- Slack: Join our #kubeflow-ml-experience Slack channel
- Meetings: Attend the Kubeflow SDK and ML Experience bi-weekly meetings
- GitHub: Discussions, issues and contributions at kubeflow/sdk
Contributing
Kubeflow SDK is a community project and is still under active development. We welcome contributions! Please see our CONTRIBUTING Guide for details.
Documentation
- Design Document: Kubeflow SDK design proposal
- Component Guides: Individual component documentation
- DeepWiki: AI-powered repository documentation
✨ Contributors
We couldn't have done it without these incredible people:
Project details
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kubeflow_test-0.6.0.tar.gz.
File metadata
- Download URL: kubeflow_test-0.6.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42425ff8a4d182ec4f59a204a84233b551854918bc76902b659857052f733e11
|
|
| MD5 |
cd46171f1035a18cb570d93150c4978a
|
|
| BLAKE2b-256 |
671b9711793fef9dfaeb96d913b1a2e8ec31584198668bc9bf5d58408eaa434e
|
Provenance
The following attestation bundles were made for kubeflow_test-0.6.0.tar.gz:
Publisher:
release.yaml on kramaranya/sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kubeflow_test-0.6.0.tar.gz -
Subject digest:
42425ff8a4d182ec4f59a204a84233b551854918bc76902b659857052f733e11 - Sigstore transparency entry: 461449342
- Sigstore integration time:
-
Permalink:
kramaranya/sdk@663a06a54a3b647ec9e7134c0b90d07552391d5e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kramaranya
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@663a06a54a3b647ec9e7134c0b90d07552391d5e -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file kubeflow_test-0.6.0-py3-none-any.whl.
File metadata
- Download URL: kubeflow_test-0.6.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30fa0c96c1e90b963833a3574edfd32948c4f61cbbe7ba612f5e1206634a3ef8
|
|
| MD5 |
6b62e0aef905d6e64f3e0872dbdd67c8
|
|
| BLAKE2b-256 |
67130bd5ff40e56d8fd27afc2b01bf7d9afd45f928abf346c404bb415a9535dd
|
Provenance
The following attestation bundles were made for kubeflow_test-0.6.0-py3-none-any.whl:
Publisher:
release.yaml on kramaranya/sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kubeflow_test-0.6.0-py3-none-any.whl -
Subject digest:
30fa0c96c1e90b963833a3574edfd32948c4f61cbbe7ba612f5e1206634a3ef8 - Sigstore transparency entry: 461449366
- Sigstore integration time:
-
Permalink:
kramaranya/sdk@663a06a54a3b647ec9e7134c0b90d07552391d5e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kramaranya
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@663a06a54a3b647ec9e7134c0b90d07552391d5e -
Trigger Event:
workflow_run
-
Statement type: