lambda7xx / skypilot

SkyPilot is a framework for easily running machine learning workloads on any cloud through a unified interface.

Home Page:https://skypilot.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SkyPilot

pytest Documentation Status

SkyPilot is a framework for easily running machine learning workloads1 on any cloud.

Use the clouds easily and cost effectively, without needing cloud infra expertise.

Ease of use & productivity

  • Run existing projects on the cloud with zero code changes
  • Easily manage jobs across multiple clusters
  • Automatic fail-over to find scarce resources (GPUs) across regions and clouds
  • Store datasets on the cloud and access them like you would on a local file system
  • No cloud lock-in – seamlessly run your code across different cloud providers (AWS, Azure or GCP)

Cost saving

  • Run jobs on spot instances with automatic recovery from preemptions
  • Hands-free cluster management: automatically stopping idle clusters
  • One-click use of TPUs, for high-performance, cost-effective training
  • Automatically benchmark and find the cheapest hardware for your job

Getting Started

You can find our documentation here.

Example SkyPilot Task

A SkyPilot task is specified as a YAML file containing the resource requirements, data to be synced, setup commands, and the task commands.

Once written in a YAML, the task can be launched on any available cloud. Example:

# my_task.yaml
resources:
  # 1x NVIDIA V100 GPU
  accelerators: V100:1

# Number of VMs to launch in the cluster
num_nodes: 1

# Working directory (optional) containing the project codebase.
# Its contents are synced to ~/sky_workdir/ on the cluster.
workdir: ~/torch_examples

# Commands to be run before executing the job
# Typical use: pip install -r requirements.txt, git clone, etc.
setup: |
  pip install torch torchvision

# Commands to run as a job
# Typical use: make use of resources, such as running training.
run: |
  cd mnist
  python main.py --epochs 1

Prepare the workdir by cloning locally:

git clone https://github.com/pytorch/examples.git ~/torch_examples

Launch with sky launch:

sky launch my_task.yaml

SkyPilot will perform multiple actions for you:

  1. Find the lowest priced VM instance type across different clouds
  2. Provision the VM
  3. Copy the local contents of workdir to the VM
  4. Run the task's setup commands to prepare the VM for running the task
  5. Run the task's run commands

SkyPilot Demo

See examples for more YAMLs that run popular ML frameworks on the cloud with one command (PyTorch/Distributed PyTorch, TensorFlow/Distributed TensorFlow, HuggingFace, JAX, Flax, Docker).

Besides YAML, SkyPilot offers a corresponding Python API for more advanced programmatic use.

Refer to Quickstart for more on how to get started with SkyPilot.

Issues, feature requests and questions

We are excited to hear your feedback! SkyPilot has two channels for engaging with the community - GitHub Issues and GitHub Discussions.

Contributing

We welcome and value all contributions to the project! Please refer to the contribution guide for more on how to get involved.

Footnotes

  1. SkyPilot is currently targeted at machine learning workloads, but it can also support many general workloads. We're excited to hear about your use case and would love to hear more about how we can better support your requirements - please join us in this discussion!

About

SkyPilot is a framework for easily running machine learning workloads on any cloud through a unified interface.

https://skypilot.readthedocs.io

License:Apache License 2.0


Languages

Language:Python 97.4%Language:Jinja 2.0%Language:Shell 0.6%Language:Dockerfile 0.0%