[tune/docs] Add PTL example to tune docs/examples (#11474)

This commit is contained in:
Kai Fricke
2020-10-19 22:47:58 +01:00
committed by GitHub
parent 79fd1cfe6f
commit 2f74fe5b71
3 changed files with 8 additions and 1 deletions
@@ -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:
+1
View File
@@ -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