ray/doc/source/train/examples.rst
Antoni Baum b9a4f64f32
[AIR/train] Use new Train API (#25735)
Uses the new AIR Train API for examples and tests.

The `Result` object gets a new attribute - `log_dir`, pointing to the Trial's `logdir` allowing users to access tensorboard logs and artifacts of other loggers.

This PR only deals with "low hanging fruit" - tests that need substantial rewriting or Train user guide are not touched. Those will be updated in followup PRs.

Tests and examples that concern deprecated features or which are duplicated in AIR have been removed or disabled.

Requires https://github.com/ray-project/ray/pull/25943 to be merged in first
2022-07-07 12:28:37 -07:00

100 lines
2.3 KiB
ReStructuredText

.. _train-examples:
Ray Train Examples
==================
.. Example .rst files should be organized in the same manner as the
.py files in ray/python/ray/train/examples.
Below are examples for using Ray Train with a variety of models, frameworks,
and use cases.
General Examples
----------------
PyTorch
~~~~~~~
* :doc:`/train/examples/torch_linear_example`:
Simple example for PyTorch.
* :doc:`/train/examples/torch_fashion_mnist_example`:
End-to-end example for PyTorch.
* :doc:`/train/examples/transformers/transformers_example`:
End-to-end example for HuggingFace Transformers (PyTorch).
TensorFlow
~~~~~~~~~~
* :doc:`/train/examples/tensorflow_mnist_example`:
End-to-end example for TensorFlow
Horovod
~~~~~~~
* :doc:`/train/examples/horovod/horovod_example`:
End-to-end example for Horovod (with PyTorch)
..
TODO
* :doc:`/train/examples/TODO`:
Simple example for TensorFlow
* :doc:`/train/examples/TODO`:
Simple example for Horovod (with TensorFlow)
Logger/Callback Examples
------------------------
* :doc:`/train/examples/mlflow_fashion_mnist_example`:
Example for logging training to MLflow via the ``MLflowLoggerCallback``
Ray Datasets Integration Examples
---------------------------------
* :doc:`/train/examples/tensorflow_linear_dataset_example`:
Simple example for training a linear TensorFlow model.
* :doc:`/train/examples/torch_linear_dataset_example`:
Simple example for training a linear PyTorch model.
* :doc:`/train/examples/tune_torch_linear_dataset_example`:
Simple example for tuning a linear PyTorch model.
Ray Tune Integration Examples
-----------------------------
* :doc:`/train/examples/tune_linear_example`:
Simple example for tuning a PyTorch model.
* :doc:`/train/examples/tune_tensorflow_mnist_example`:
End-to-end example for tuning a TensorFlow model.
* :doc:`/train/examples/tune_cifar_torch_pbt_example`:
End-to-end example for tuning a PyTorch model with PBT.
..
TODO implement these examples!
Features
--------
* Example for using a custom callback
* End-to-end example for running on an elastic cluster (elastic training)
Models
------
* Example training on Vision model.
Benchmarks
----------
* :doc:`/train/examples/torch_data_prefetch_benchmark/benchmark_example`:
Benchmark example for the PyTorch data transfer auto pipeline.