Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 1.86 KB

File metadata and controls

45 lines (31 loc) · 1.86 KB

The CodeFlare Stack - Scenario 3

Bring Your Own Code

I have my own training code, and want to run it at scale.

Goals: Productive Use
You Provide: Python source code | S3 data | Command-line options to tweak the run parameters
CodeFlare Stack Provides: Ray cluster | Kubernetes management | Distributed training job | Link S3 credentials | Pop-up Dashboards


This example utilizes the "bring your own code" feature of the CodeFlare Stack. We will point the CLI to this simple example that uses Ray Tune. In this mode, you point the CLI tool to a working directory that contains a main.py and (optionally) a requirements.txt. Make a local directory and download those two files from here:

This script mimics "bringing your own code". Normally, you would have the code already sitting in a directory on your laptop:

mkdir codeflare-scenario-1 && cd codeflare-scenario-1
curl -LO https://raw.githubusercontent.com/project-codeflare/codeflare-cli/main/tests/kind/inputs/ray-tune-tutorial/main.py
curl -LO https://raw.githubusercontent.com/project-codeflare/codeflare-cli/main/tests/kind/inputs/ray-tune-tutorial/requirements.txt

Then launch the codeflare CLI and point it to your directory:

codeflare ml/codeflare/training/byoc

The CLI In Action

Pop-up CodeFlare Dashboard In Action

codeflare-scenario-1.mp4

Back to Top