Skip to content

[Docs] Add PyTorch Lightning examples to Tune examples README (#54954)#63438

Open
dstrodtman wants to merge 1 commit into
ray-project:masterfrom
dstrodtman:doc-965-fix-lightning-example-link
Open

[Docs] Add PyTorch Lightning examples to Tune examples README (#54954)#63438
dstrodtman wants to merge 1 commit into
ray-project:masterfrom
dstrodtman:doc-965-fix-lightning-example-link

Conversation

@dstrodtman
Copy link
Copy Markdown
Contributor

Description

The reporter followed a stale link from a 2022 issue to python/ray/tune/examples looking for a PyTorch Lightning example script. The historical mnist_pytorch_lightning.py is 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's README.rst. This PR adds a PyTorch Lightning Examples section to python/ray/tune/examples/README.rst that names those scripts and links to the tune-pytorch-lightning walkthrough so users browsing the examples folder on GitHub can find Lightning content.

Related issues

Closes #54954

[DOC-965]

Additional information

  • Target file: python/ray/tune/examples/README.rst
  • Linked walkthrough: https://docs.ray.io/en/latest/tune/examples/tune-pytorch-lightning.html (verified resolves)
  • No existing docs cross-references pointed to the removed mnist_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

…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>
@dstrodtman dstrodtman requested a review from a team as a code owner May 18, 2026 15:00
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with other entries in this file, consider removing the leading 'A ' and using 'Tune' instead of 'Ray Tune'.

Suggested change
- `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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
- `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.

@ray-gardener ray-gardener Bot added tune Tune-related issues docs An issue or change related to documentation labels May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs An issue or change related to documentation tune Tune-related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[tune] No example script for Pytorch lightning

1 participant