mirror of
https://github.com/wassname/ray.git
synced 2026-06-27 19:32:11 +08:00
[tune/docs] Add PTL example to tune docs/examples (#11474)
This commit is contained in:
@@ -26,7 +26,7 @@ use it plug and play for your existing models, assuming their parameters are con
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ pip install ray torch torchvision pytorch-lightning
|
||||
$ pip install "ray[tune]" torch torchvision pytorch-lightning
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
@@ -44,6 +44,7 @@ PyTorch Examples
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
- :doc:`/tune/examples/mnist_pytorch`: Converts the PyTorch MNIST example to use Tune with the function-based API. Also shows how to easily convert something relying on argparse to use Tune.
|
||||
- :doc:`/tune/examples/mnist_pytorch_lightning`: Uses `Pytorch Lightning <https://github.com/PyTorchLightning/pytorch-lightning>`_ to train a MNIST model. This example utilizes the Ray Tune-provided :ref:`PyTorch Lightning callbacks <tune-integration-pytorch-lightning>`. See also :ref:`this tutorial for a full walkthrough <tune-pytorch-lightning>`.
|
||||
- :doc:`/tune/examples/mnist_pytorch_trainable`: Converts the PyTorch MNIST example to use Tune with Trainable API. Also uses the HyperBandScheduler and checkpoints the model at the end.
|
||||
- :doc:`/tune/examples/ddp_mnist_torch`: An example showing how to use DistributedDataParallel with Ray Tune. This enables both distributed training and distributed hyperparameter tuning.
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
:orphan:
|
||||
|
||||
mnist_pytorch_lightning
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. literalinclude:: /../../python/ray/tune/examples/mnist_pytorch_lightning.py
|
||||
Reference in New Issue
Block a user