[Docs] Add PyTorch Lightning examples to Tune examples README (#54954)#63438
[Docs] Add PyTorch Lightning examples to Tune examples README (#54954)#63438dstrodtman wants to merge 1 commit into
Conversation
…oject#54954) Users navigating to python/ray/tune/examples on GitHub previously found no PyTorch Lightning entry, even though mnist_ptl_mini.py and mlflow_ptl.py live in that directory. Add a PyTorch Lightning Examples section to python/ray/tune/examples/README.rst that lists the surviving scripts and links to the tune-pytorch-lightning walkthrough. Closes ray-project#54954 [DOC-965] Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Douglas Strodtman <douglas@anyscale.com>
There was a problem hiding this comment.
Code Review
This pull request adds a new section for PyTorch Lightning examples to the Ray Tune examples README, including links to a tutorial and two example scripts. Feedback focuses on improving the consistency of the example descriptions and specifically mentioning the MLflow autologging feature in the relevant script description.
| For a full walkthrough of tuning a PyTorch Lightning model with Ray Tune, see the | ||
| `Using PyTorch Lightning with Tune <https://docs.ray.io/en/latest/tune/examples/tune-pytorch-lightning.html>`__ tutorial. | ||
|
|
||
| - `mnist_ptl_mini <https://github.com/ray-project/ray/blob/master/python/ray/tune/examples/mnist_ptl_mini.py>`__: A minimal example of tuning a PyTorch Lightning MNIST classifier with Ray Tune. |
There was a problem hiding this comment.
For consistency with other entries in this file, consider removing the leading 'A ' and using 'Tune' instead of 'Ray Tune'.
| - `mnist_ptl_mini <https://github.com/ray-project/ray/blob/master/python/ray/tune/examples/mnist_ptl_mini.py>`__: A minimal example of tuning a PyTorch Lightning MNIST classifier with Ray Tune. | |
| - `mnist_ptl_mini <https://github.com/ray-project/ray/blob/master/python/ray/tune/examples/mnist_ptl_mini.py>`__: Minimal example of tuning a PyTorch Lightning MNIST classifier with Tune. |
| `Using PyTorch Lightning with Tune <https://docs.ray.io/en/latest/tune/examples/tune-pytorch-lightning.html>`__ tutorial. | ||
|
|
||
| - `mnist_ptl_mini <https://github.com/ray-project/ray/blob/master/python/ray/tune/examples/mnist_ptl_mini.py>`__: A minimal example of tuning a PyTorch Lightning MNIST classifier with Ray Tune. | ||
| - `mlflow_ptl <https://github.com/ray-project/ray/blob/master/python/ray/tune/examples/mlflow_ptl.py>`__: Example for using `MLflow <https://github.com/mlflow/mlflow/>`__ and PyTorch Lightning with Ray Tune. |
There was a problem hiding this comment.
The mlflow_ptl.py script specifically demonstrates MLflow's autologging feature. It would be helpful to mention this in the description. Also, 'Example of using' and 'Tune' are more consistent with the rest of the file.
| - `mlflow_ptl <https://github.com/ray-project/ray/blob/master/python/ray/tune/examples/mlflow_ptl.py>`__: Example for using `MLflow <https://github.com/mlflow/mlflow/>`__ and PyTorch Lightning with Ray Tune. | |
| - `mlflow_ptl <https://github.com/ray-project/ray/blob/master/python/ray/tune/examples/mlflow_ptl.py>`__: Example of using `MLflow <https://github.com/mlflow/mlflow/>`__ autologging and PyTorch Lightning with Tune. |
Description
The reporter followed a stale link from a 2022 issue to
python/ray/tune/exampleslooking for a PyTorch Lightning example script. The historicalmnist_pytorch_lightning.pyis gone, but two surviving Lightning scripts (mnist_ptl_mini.py,mlflow_ptl.py) still live in that directory and aren't mentioned in the directory'sREADME.rst. This PR adds aPyTorch Lightning Examplessection topython/ray/tune/examples/README.rstthat names those scripts and links to thetune-pytorch-lightningwalkthrough so users browsing the examples folder on GitHub can find Lightning content.Related issues
Closes #54954
[DOC-965]
Additional information
python/ray/tune/examples/README.rstmnist_pytorch_lightning.py, so this PR doesn't update any inbound links — it surfaces the existing Lightning examples that were previously hidden from the README's index.🤖 Generated with Claude Code