Prerequisites
Domino helps you manage Ray cluster infrastructure with on-demand clusters, but before you use Ray clusters, you must first setup Ray clusters in Domino.Import and run the training script
In this example, you tune a PyTorch Lightning classifier on the MNIST dataset. You’ll use Ray Tune to run permutations on layer size, learning rate, and batch size. Import the RayTune GitHub reference project into Domino:- In the Domino navigation pane, click Projects > New Project.
- In the Create new Project window, enter a name like “Ray Tune example”.
- Under Hosted By, select Git Service Provider > GitHub
- For Git Repository URL, enter “https://github.com/ddl-jwu/ray-tune”.
- In the project, launch a Ray-enabled VSCode Workspace and load train.py to explore the training script.
-
In VSCode, open a terminal and type
python train.pyto run the script.
Run the training script as a job
You can also run the training script as a job to remove the workspace creation steps. Jobs are useful automation mechanisms in Domino.- In the project you imported from GitHub in the previous section, click Jobs.
- Configure a run with train.py.
Visualize and compare results
To view an individual trial, follow these steps:- Click the Experiments link to see the trials logged by a workspace or the information icon to see the trials logged by a job.
- Click an individual trial and the Metrics tab to see the full-time-series metrics.
- Look for the general trend of the metrics over time, especially with deep-learning scenarios where compute costs drive decisions. If your accuracy shows slight or no improvement, there’s no point in using more resources to go down this path.
- Select at least two trials from the main Experiments page and click the compare icon.
-
Use the side-by-side comparison to discover how different parameters impact accuracy and run time.
When you change the Chart type to Line, you can also examine the time series charts for the metrics side-by-side.
- Click on a specific trial chart line.
- Analyze differences captured in metadata: different compute environments, users, start times, and workspaces.