Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/comet-ml/ray-tune-example
Example for using Ray Tune's Comet Integration
https://github.com/comet-ml/ray-tune-example
Last synced: 7 days ago
JSON representation
Example for using Ray Tune's Comet Integration
- Host: GitHub
- URL: https://github.com/comet-ml/ray-tune-example
- Owner: comet-ml
- Created: 2022-02-28T12:03:36.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-04-04T10:40:42.000Z (over 2 years ago)
- Last Synced: 2023-03-07T20:26:41.858Z (over 1 year ago)
- Language: Python
- Size: 19.5 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Setup
To enable Comet Logging for this example, we will have to install Ray from Source.
## 1. Create a Virtual Environment
We will use `conda` to create our virtual environment, but feel free to use your preferred method for creating Python virtual environments.
```
conda create -n comet-ray-tune python=3.8
conda activate comet-ray-tune
```## 2. Run the Setup Helper Script
The helper script, `setup.sh` will install Ray in the virtual environment```
chmod +x setup.sh && ./setup.sh
```# Set your Comet Credentials
In order to run the example, you will need to set the following Comet credentials using environment variables.
```
export COMET_API_KEY=
export COMET_WORKSPACE=
export COMET_PROJECT_NAME=
```# Run the Example
The following command will run a hyperparameter sweep using `tune` on the MNIST dataset, and log metrics, hyperparameters, and checkpoints to Comet.
Each Ray `trial_id` will be logged as an individual experiment in Comet.
## Example using the `CometLoggerCallback`
```
python tune_comet_callback.py
```## Example using the Ray Functional API
```
python tune_comet_functional.py
```## Example using the Ray Trainable Class API
```
python tune_comet_trainable.py
```# Example Tune Run in Comet
Here is an example project with a completed `tune` sweep
[Ray Tune Example Project](https://www.comet.ml/team-comet-ml/ray-tune-example/view/D2AbZI0Rh9ZdXFV5VbqwW0vCC/experiments)