Example MNIST training using the following tech stack:
- Python 3.10.12
- Ray
- PyTorch
- PyTorch Lightning
- MLflow
- mnist.py. Main training. Example from Ray's documentation.
- requirements.txt. Install via:
pip install -r requirements.txt
- freeze.txt. Resulting run-time environment.
In ray.tune.examples.mnist_ptl_mini
package, change
self.accuracy = Accuracy()
to
self.accuracy = Accuracy(task="multiclass", num_classes=10)
python mnist.py
The experiments will be recorded to MLflow in a local folder, mlruns
and to Ray Tune in ~/ray_results/tune_mnist
.
Launch MLflow in the launch folder.
mlflow ui