Skip to main content

Wrapper around the Ray library to make it easier for you to set up your ML project to use Ray to train/tune your models remotely on a GPU-enabled computer

Project description

This project allows you to set up your machine-learning project so that you can develop locally on your computer and then train and tune your models remotely on a GPU-enabled computer. The remote training/tuning is implemented using Ray.

Why Ray QuickStart?

I think a lot of developers (like me) who are interested in getting started with ML learning are using Macs for their development, but Macs don't have GPUs and MPS devices are still nowhere close to being as fast as GPUS. I ended up buying a GPU card for my Windows computer, but found it cumbersome to develop on my Mac, commit my changes to GitHub, push the changes to my Windows computer, and then run my training and tuning from my Windows computer. In addition, I found myself having to manually save the trained models to the cloud and then download them to my Mac to use them for inference afterwards.

Ray was designed to address this inefficiency, but I didn't find it as easy as I would have liked to get it set up for remote training and tuning on another computer. It's possible that they have the functionality already in place, so please let me know if I am reinventing the wheel somewhere.

Over time, I hope to add additional functionality to allow you to train from a cluster in the cloud once your needs exceed the capabilities of your GPU card.

Limitations Addressed By Ray QuickStart

This project does the following to make it easier for you to get started with remote training and tuning:

  1. Help you create an Ubuntu 22.04 VM on your Windows computer using WSL2. I need Windows for some of my work and tried to run the Ray cluster directly from Windows, but it doesn't look like Ray supports it yet: I ran into issues trying to sync the checkpoints from Windows to my Mac computer.
  2. Note that you will need to start the Ubuntu instanceYou will need to start your Ubuntu instance using wsl

Setup

  1. You can get started by either cloning this repository or by installing the ray-quickstart package from PyPI. The former is preferred if you want to try out the example project, but the latter is preferred if you want to use this package in your own project.

  2. If your computer with the GPU card has Windows installed, you can run setup\setup_windows.bat to set up Ubuntu 22.04 on your computer.

    If your computer with the GPU card has Ubuntu installed, you can run setup/setup_ubuntu.sh to set it up.

Setup

  1. Create a YAML configuration file named ray_config.yaml in the root directory of your project.
  2. Ray QuickStart expects a configuration file named ray_config.yaml to be present in the root directory of your project.

Troubleshooting

When I connect to the Ubuntu WSL instance, it says that the GPU is not available. What can I do to fix this?

I got stumped on this issue for a while. From https://github.com/microsoft/WSL/issues/9185, I discovered the cause:

There is an issue when nvidia-smi doesn't work when one instance is launched as Administrator and another as a non-Administrator.

When I started the Ubuntu WSL instance from the command line and passed in the --user flag with the same username as in Windows, then it worked. It is recommended that you start the Ubuntu WSL instance using the ubuntu_start.sh script.

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

ray-quickstart-0.1.3.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

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

ray_quickstart-0.1.3-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file ray-quickstart-0.1.3.tar.gz.

File metadata

  • Download URL: ray-quickstart-0.1.3.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for ray-quickstart-0.1.3.tar.gz
Algorithm Hash digest
SHA256 fe7d96da7d74dee42e4c99d69ad6c9657374eaf3985f8bfc99c227e566196f17
MD5 ce034eb9a5bfffc06a17621a95fd5cfc
BLAKE2b-256 5b06af9f45963fd3ce5d2c995c34ac60b04fadbdce8c0c8880ef3707e631ed4d

See more details on using hashes here.

File details

Details for the file ray_quickstart-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: ray_quickstart-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for ray_quickstart-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d88172117ad3819d34469b3448567454aad45af78aabfae9de1c506fd199a10b
MD5 475198bbf8e69ae8b61c1dfea4b0b716
BLAKE2b-256 92fc1e1c9ad6afabe719c39cc898802e8076c234ad3bd6bf7b05f9697551224a

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