Skip to content

Commit

Permalink
[air/docs] Refactor AIR documentation -- update user guides (2/n) (ra…
Browse files Browse the repository at this point in the history
  • Loading branch information
richardliaw authored Jul 25, 2023
1 parent 5f1e274 commit feca9b4
Show file tree
Hide file tree
Showing 43 changed files with 376 additions and 755 deletions.
16 changes: 7 additions & 9 deletions doc/source/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,6 @@ parts:
title: "Ray AI Runtime (AIR)"
sections:
- file: ray-air/key-concepts
- file: ray-air/user-guides
sections:
- file: ray-air/preprocessors
- file: ray-air/trainers
- file: ray-air/check-ingest
- file: ray-air/tuner
- file: ray-air/predictors
- file: ray-air/computer-vision
- file: ray-air/deployment
- file: ray-air/api/api
- file: ray-air/benchmarks

Expand Down Expand Up @@ -82,10 +73,17 @@ parts:
title: "Configuring Ray Train"
- file: train/dl_guide
title: "Deep Learning Guide"
- file: train/hf_trainers
title: "Hugging Face Trainers"
- file: train/gbdt
title: "XGBoost/LightGBM guide"
- file: train/architecture
title: "Ray Train Architecture"
- file: train/train-with-tune
title: "Using Ray Train with Ray Tune"
- file: train/check-ingest
title: "Configuring Training Datasets"
- file: train/predictors
- file: train/examples
title: "Examples"
sections:
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions doc/source/data/images/air-preprocessor.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions doc/source/data/images/preprocessors.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Ray AIR provides several common preprocessors out of the box and interfaces to d
Overview
--------

The most common way of using a preprocessor is by passing it as an argument to the constructor of a :ref:`Trainer <air-trainers>` in conjunction with a :ref:`Ray Data <data>`.
The most common way of using a preprocessor is by passing it as an argument to the constructor of a Ray Train :ref:`Trainer <train-getting-started>` in conjunction with a :ref:`Ray Data dataset <data>`.
For example, the following code trains a model with a preprocessor that normalizes the data.

.. literalinclude:: doc_code/preprocessors.py
Expand Down Expand Up @@ -119,7 +119,7 @@ Predictor
A ``Predictor`` can be constructed from a saved ``Checkpoint``. If the ``Checkpoint`` contains a ``Preprocessor``,
then the ``Preprocessor`` calls ``transform_batch`` on input batches prior to performing inference.

In the following example, we show the Batch Predictor flow. The same logic applies to the :ref:`Online Inference flow <air-key-concepts-online-inference>`.
In the following example, we show the Batch Predictor flow.

.. literalinclude:: doc_code/preprocessors.py
:language: python
Expand Down
1 change: 1 addition & 0 deletions doc/source/data/user-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ show you how achieve several tasks.
working-with-pytorch
batch_inference
performance-tips
preprocessors
3 changes: 2 additions & 1 deletion doc/source/ray-air/api/checkpoint.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.. _air-checkpoint-ref:
.. _checkpoint-api-ref:

.. _air-checkpoint-ref:

Ray AIR Checkpoint
==================

Expand Down
7 changes: 4 additions & 3 deletions doc/source/ray-air/computer-vision.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:orphan:

.. _computer-vision:

Computer Vision
Expand Down Expand Up @@ -183,8 +185,7 @@ Training vision models
:end-before: __torch_trainer_stop__
:dedent:

For more in-depth examples, see
:ref:`Using Trainers <air-trainers>`.
For more in-depth examples, see :ref:`Using Trainers <train-getting-started>`.

.. tab-item:: TensorFlow

Expand All @@ -203,7 +204,7 @@ Training vision models
:end-before: __tensorflow_trainer_stop__
:dedent:

For more information, read :ref:`Using Trainers <air-trainers>`.
For more information, read :ref:`Using Trainers <train-getting-started>`.

Creating checkpoints
--------------------
Expand Down
2 changes: 2 additions & 0 deletions doc/source/ray-air/deployment.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:orphan:

.. _air-deployment:

How to Deploy AIR
Expand Down
4 changes: 2 additions & 2 deletions doc/source/ray-air/key-concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Trainers

Trainers are wrapper classes around third-party training frameworks such as XGBoost and Pytorch. They are built to help integrate with core Ray actors (for distribution), Ray Tune, and Ray Data.

See the documentation on :ref:`Trainers <air-trainers>`.
See the documentation on :ref:`Trainers <train-getting-started>`.

.. literalinclude:: doc_code/air_key_concepts.py
:language: python
Expand All @@ -54,7 +54,7 @@ These objects contain training metrics as well as checkpoints to retrieve the be
Tuner
-----

:ref:`Tuners <air-tuner-ref>` offer scalable hyperparameter tuning as part of :ref:`Ray Tune <tune-main>`.
:ref:`Tuners <tune-tutorial>` offer scalable hyperparameter tuning as part of :ref:`Ray Tune <tune-main>`.

Tuners can work seamlessly with any Trainer but also can support arbitrary training functions.

Expand Down
253 changes: 0 additions & 253 deletions doc/source/ray-air/trainers.rst

This file was deleted.

Loading

0 comments on commit feca9b4

Please sign in to comment.