Skip to main content

A Python interface for running ML workloads on Kubernetes

Project description

📦Kubetorch🔥

A Python interface for running ML workloads on Kubernetes

Kubetorch enables you to run any Python code on Kubernetes at any scale by specifying required resources, distribution, and scaling directly in code. It provides caching and hot redeployment for 1-2 second iteration cycles, handles hardware faults and preemptions programmatically, and orchestrates complex, heterogeneous workloads with built-in observability and fault tolerance.

Hello World

from kubetorch import fn

def hello_world():
    return "Hello from Kubetorch!"

if __name__ == "__main__":
    # Define your compute
    compute = kt.Compute(cpus=".1")

    # Send local function to freshly launched remote compute
    remote_hello = kt.fn(hello_world).to(compute)

    # Runs remotely on your Kubernetes cluster
    result = hello_world()
    print(result)  # "Hello from Kubetorch!"

What Kubetorch Enables

  • 100x faster iteration from 10+ minutes to 1-3 seconds for complex ML applications like RL and distributed training
  • 50%+ compute cost savings through intelligent resource allocation, bin-packing, and dynamic scaling
  • 95% fewer production faults with built-in fault handling with programmatic error recovery and resource adjustment

Installation

1. Python Client

pip install "kubetorch[client]"

2. Kubernetes Deployment (Helm)

# Option 1: Install directly from OCI registry
helm upgrade --install kubetorch oci://ghcr.io/run-house/charts/kubetorch \
  --version 0.2.1 -n kubetorch --create-namespace

# Option 2: Download chart locally first
helm pull oci://ghcr.io/run-house/charts/kubetorch --version 0.2.1 --untar
helm upgrade --install kubetorch ./kubetorch -n kubetorch --create-namespace

For detailed setup instructions, see our Installation Guide.

Learn More


Apache 2.0 License

🏃‍♀️ Built by Runhouse 🏠

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

kubetorch-0.2.1.tar.gz (189.3 kB view details)

Uploaded Source

Built Distribution

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

kubetorch-0.2.1-py3-none-any.whl (228.7 kB view details)

Uploaded Python 3

File details

Details for the file kubetorch-0.2.1.tar.gz.

File metadata

  • Download URL: kubetorch-0.2.1.tar.gz
  • Upload date:
  • Size: 189.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.11.9 Darwin/24.6.0

File hashes

Hashes for kubetorch-0.2.1.tar.gz
Algorithm Hash digest
SHA256 85cb03639393883a34bd26f219b03165d113326390063f0c16fb02d1c646c1c6
MD5 821d38d6374e9340b5751bd87c016934
BLAKE2b-256 91fbb83c9d4ad4f5f5e5e02cf226b30fcf85b67e046ee56f92a9afc103cd2bd0

See more details on using hashes here.

File details

Details for the file kubetorch-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: kubetorch-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 228.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.11.9 Darwin/24.6.0

File hashes

Hashes for kubetorch-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fd181bd1f92b6edc70a916c8885fae20012625b5b30abe14d766a880a1546cda
MD5 af009a40815f58baf94724256c96cf89
BLAKE2b-256 87c04a59f0c32770cd1e728fcf8dbd16edd1694b05effea6ba488cd0b8a4d870

See more details on using hashes here.

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