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.2 -n kubetorch --create-namespace

# Option 2: Download chart locally first
helm pull oci://ghcr.io/run-house/charts/kubetorch --version 0.2.2 --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.2.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.2-py3-none-any.whl (228.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kubetorch-0.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 ce77b5d6cf429bfbcc440b173eb5d3d7217d2d5d4ee2cde675bb5f17e123c7a0
MD5 3e2ff460d9c6856383b456c8d2940306
BLAKE2b-256 d8cfcee422f0470b74bb858791c76281d0ad592ed35c775b93d9397216e0709b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kubetorch-0.2.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 eaade249c75ff10ebc1563ab7a2200ab9f978b5f2bbfdcd0f580a1823df11a1c
MD5 cd39900b010bf01e87381050423963df
BLAKE2b-256 38656c7b492b5d65c93cb41ab0b5eba4328cf8dc424dc6097b2c6db003d7eec7

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