Skip to main content

Easy-to-run ML workflows on any cloud

Project description

dstack

Easy-to-run ML workflows on any cloud

Define ML workflows as code and run via CLI. Use any cloud. Collaborate within teams.

Slack

DocsQuick startBasicsSlack

Last commit PyPI - License

dstack is the most easy way to define ML workflows as code and run them either locally or remotely on any cloud.

Highlighted features

  • Define ML workflows declaratively as code
  • Run workflows locally or remotely on any cloud (AWS, GCP, etc)
  • Use on-demand on spot instances conveniently
  • Save data, checkpoints, environments as artifacts and reuse them across workflows
  • No need to use custom Docker images or Kubernetes

Installation

Use pip to install the dstack CLI:

pip install dstack --upgrade

Example

Here's an example from the Quick start.

workflows:
  - name: mnist-data
    provider: bash
    commands:
      - pip install torchvision
      - python mnist/mnist_data.py
    artifacts:
      - path: ./data

  - name: train-mnist
    provider: bash
    deps:
      - workflow: mnist-data
    commands:
      - pip install torchvision pytorch-lightning tensorboard
      - python mnist/train_mnist.py
    artifacts:
      - path: ./lightning_logs

YAML-defined workflows eliminate the need to modify code in your scripts, giving you the freedom to choose frameworks, experiment trackers, and cloud providers.

Run locally

Use the dstack CLI to run workflows locally:

dstack run mnist-data

Run remotely

To run workflows remotely (e.g. in the cloud) or share artifacts outside your machine, you must configure your remote settings using the dstack config command:

dstack config

This command will ask you to choose the type of backend (e.g. AWS), and the corresponding settings (e.g. the region where to run workflows, an S3 bucket where to store artifacts, etc).

Backend: aws
AWS profile: default
AWS region: eu-west-1
S3 bucket: dstack-142421590066-eu-west-1
EC2 subnet: none

For more details on how to configure a remote, check the installation guide.

Once a remote is configured, use the --remote flag with the dstack run command to run the workflow in the configured cloud:

dstack run mnist-data --remote

You can configure the required resources to run the workflows either via the resources property in YAML or the dstack run command's arguments, such as --gpu, --gpu-name, etc:

dstack run train-mnist --remote --gpu 1

When you run a workflow remotely, dstack automatically creates resources in the configured cloud, and releases them once the workflow is finished.

More information

For additional information and examples, see the following links:

Licence

Mozilla Public License 2.0

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

dstack-0.2rc1.tar.gz (96.3 kB view details)

Uploaded Source

Built Distribution

dstack-0.2rc1-py3-none-any.whl (14.8 MB view details)

Uploaded Python 3

File details

Details for the file dstack-0.2rc1.tar.gz.

File metadata

  • Download URL: dstack-0.2rc1.tar.gz
  • Upload date:
  • Size: 96.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for dstack-0.2rc1.tar.gz
Algorithm Hash digest
SHA256 dcbfa3cf521979a6be4fc00d09f8d566f44b392a5a42e525ba0ee9da12afa522
MD5 35df24259e1c9429c560068bd6a32479
BLAKE2b-256 f5b02f9c1a112a68f06cc883816b3017fa073fd1288b2f249a9cc875a2c1773a

See more details on using hashes here.

File details

Details for the file dstack-0.2rc1-py3-none-any.whl.

File metadata

  • Download URL: dstack-0.2rc1-py3-none-any.whl
  • Upload date:
  • Size: 14.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for dstack-0.2rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 1705970782865b6356cf5607ebf654a568a6c777ecb1a97ec826f0f2e37c1ece
MD5 1a9ec6860c0f4ebf2a0f8c2a0737ec2f
BLAKE2b-256 8099a5f4f2d92ab12466cfbaf374d259063b9c10270dc5f8ca1adba67d7ee451

See more details on using hashes here.

Supported by

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