Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[air] Refactor Docs for re-emphasizing libraries (3/n) #36912

Merged
merged 51 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
1618356
remove key concepts and preprocessors
richardliaw Jun 28, 2023
260b9be
move train-check-ingest
richardliaw Jun 28, 2023
8427a37
move serving guide
richardliaw Jun 28, 2023
a741a49
move predictors
richardliaw Jun 28, 2023
edf43b2
toc-consistency
richardliaw Jun 28, 2023
baaf2e7
move train guides
richardliaw Jun 28, 2023
7f89e62
move-toc
richardliaw Jun 28, 2023
3acc2eb
update toc"
richardliaw Jul 18, 2023
8395798
Merge branch 'master' into air-docs-refactor
richardliaw Jul 19, 2023
c7d1320
merge-fail
richardliaw Jul 19, 2023
37c7863
ray
richardliaw Jul 19, 2023
38c2a58
mergefail
richardliaw Jul 19, 2023
8fb86fd
update-paths
richardliaw Jul 19, 2023
f6f2485
fix references
richardliaw Jul 19, 2023
66eb904
unite-checkpoint-ref
richardliaw Jul 19, 2023
34ff37f
cleanup parts
richardliaw Jul 19, 2023
f677d53
Apply suggestions from code review
richardliaw Jul 19, 2023
51129be
orphan a couple files
richardliaw Jul 21, 2023
169b490
orphan the rest and rename
richardliaw Jul 21, 2023
ee1c6b7
Merge branch 'master' into air-docs-refactor
richardliaw Jul 21, 2023
ab7d46e
remove links
richardliaw Jul 21, 2023
75ab720
some-changes
richardliaw Jul 21, 2023
a336985
rmeovespace
richardliaw Jul 21, 2023
f10d085
orphaning
richardliaw Jul 22, 2023
235ac66
chagnes
richardliaw Jul 22, 2023
96b28d7
nit
richardliaw Jul 22, 2023
0f82847
fix
richardliaw Jul 22, 2023
c42b283
air
richardliaw Jul 22, 2023
a1f218c
update
richardliaw Jul 22, 2023
cf47312
fix
richardliaw Jul 22, 2023
6df37ae
fix-stuff
richardliaw Jul 24, 2023
a754732
rename and add section
richardliaw Jul 24, 2023
493235b
Merge branch 'master' into air-docs-refactor
richardliaw Jul 25, 2023
a7d252c
remove extra serve file
richardliaw Jul 25, 2023
3c389e9
merge
richardliaw Jul 25, 2023
240c715
Merge branch 'master' into air-docs-refactor
richardliaw Jul 25, 2023
da0fe77
merge-fail
richardliaw Jul 25, 2023
9c5d032
remove-ecosystem
richardliaw Jul 25, 2023
a2207f1
update
richardliaw Jul 25, 2023
b28c30a
fixup
richardliaw Jul 25, 2023
f93e1bc
Merge branch 'master' into air-docs-refactor
richardliaw Jul 25, 2023
8db8612
remove-label
richardliaw Jul 25, 2023
3785bf4
update-predictors
richardliaw Jul 26, 2023
60f693b
Merge branch 'fix-tests' into air-docs-refactor
richardliaw Jul 26, 2023
229a1d4
update
richardliaw Jul 26, 2023
c3f7738
remove a ton of files
richardliaw Jul 26, 2023
e2b5bc7
Merge branch 'master' into air-docs-refactor
richardliaw Jul 26, 2023
66d3477
update-fix-test
richardliaw Jul 26, 2023
42d0dc2
fixlink
richardliaw Jul 26, 2023
36eaa57
fix-comments
richardliaw Jul 27, 2023
82eea5e
remove-extra
richardliaw Jul 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' into air-docs-refactor
  • Loading branch information
richardliaw committed Jul 19, 2023
commit 8395798932565220c634ea875262ed0484b5b280
48 changes: 48 additions & 0 deletions doc/source/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,54 @@ parts:
- file: ray-core/examples/map_reduce
- file: ray-core/api/index

<<<<<<< HEAD
=======
- file: ray-air/getting-started
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/examples/serving_guide
- file: ray-air/deployment
- file: ray-air/examples/index
sections:
- file: ray-air/examples/torch_image_example
- file: ray-air/examples/torch_detection
- file: ray-air/examples/convert_existing_pytorch_code_to_ray_air
- file: ray-air/examples/convert_existing_tf_code_to_ray_air
- file: ray-air/examples/tfx_tabular_train_to_serve
- file: ray-air/examples/huggingface_text_classification
- file: ray-air/examples/sklearn_example
- file: ray-air/examples/xgboost_example
- file: ray-air/examples/analyze_tuning_results
- file: ray-air/examples/lightgbm_example
- file: ray-air/examples/torch_incremental_learning
- file: ray-air/examples/rl_serving_example
- file: ray-air/examples/rl_online_example
- file: ray-air/examples/rl_offline_example
- file: ray-air/examples/upload_to_comet_ml
- file: ray-air/examples/upload_to_wandb
- file: ray-air/examples/feast_example
- file: ray-air/examples/automl_with_ray_air
- file: ray-air/examples/batch_tuning
- file: ray-air/examples/batch_forecasting
- file: ray-air/examples/stablediffusion_batch_prediction
- file: ray-air/examples/gptj_deepspeed_fine_tuning
- file: ray-air/examples/gptj_batch_prediction
- file: ray-air/examples/gptj_serving
- file: ray-air/examples/dreambooth_finetuning
- file: ray-air/examples/dolly_lightning_fsdp_finetuning
- file: ray-air/api/api
- file: ray-air/benchmarks

>>>>>>> c89220e4b1327aff493423611e031871197243c9
- file: data/data
title: Ray Data
sections:
Expand Down
6 changes: 3 additions & 3 deletions doc/source/data/user-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ show you how achieve several tasks.
working-with-images
working-with-text
working-with-tensors
preprocessors
working-with-pytorch
batch_inference
data-internals
performance-tips
batch_inference

preprocessors
159 changes: 159 additions & 0 deletions doc/source/ray-air/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,162 @@ AIR is for both data scientists and ML engineers alike.
https://docs.google.com/drawings/d/1Qw_h457v921jWQkx63tmKAsOsJ-qemhwhCZvhkxWrWo/edit

For data scientists, AIR can be used to scale individual workloads, and also end-to-end ML applications. For ML Engineers, AIR provides scalable platform abstractions that can be used to easily onboard and integrate tooling from the broader ML ecosystem.
<<<<<<< HEAD
=======

Quick Start
-----------

Below, we walk through how AIR's unified ML API enables scaling of end-to-end ML workflows, focusing on
a few of the popular frameworks AIR integrates with (XGBoost, Pytorch, and Tensorflow).

..
https://docs.google.com/drawings/d/1z0r_Yc7-0NAPVsP2jWUkLV2jHVHdcJHdt9uN1GDANSY/edit

.. .. figure:: images/why-air.svg

.. AIR provides a unified API for the ML ecosystem.
.. This diagram shows how AIR enables an ecosystem of libraries to be run at scale in just a few lines of code.

Get started by installing Ray AIR:

.. code:: bash

pip install -U "ray[air]"

# The below Ray AIR tutorial was written with the following libraries.
# Consider running the following to ensure that the code below runs properly:
pip install -U pandas>=1.3.5
pip install -U torch>=1.12
pip install -U numpy>=1.19.5
pip install -U tensorflow>=2.6.2
pip install -U pyarrow>=6.0.1

Preprocessing
~~~~~~~~~~~~~

First, let's start by loading a dataset from storage:

.. literalinclude:: examples/xgboost_starter.py
:language: python
:start-after: __air_generic_preprocess_start__
:end-before: __air_generic_preprocess_end__

Then, we define a ``Preprocessor`` pipeline for our task:

.. tabs::

.. group-tab:: XGBoost

.. literalinclude:: examples/xgboost_starter.py
:language: python
:start-after: __air_xgb_preprocess_start__
:end-before: __air_xgb_preprocess_end__

.. group-tab:: Pytorch

.. literalinclude:: examples/pytorch_tabular_starter.py
:language: python
:start-after: __air_pytorch_preprocess_start__
:end-before: __air_pytorch_preprocess_end__

.. group-tab:: Tensorflow

.. literalinclude:: examples/tf_tabular_starter.py
:language: python
:start-after: __air_tf_preprocess_start__
:end-before: __air_tf_preprocess_end__

.. _air-getting-started-training:

Training
~~~~~~~~

Train a model with a ``Trainer`` with common ML frameworks:

.. tabs::

.. group-tab:: XGBoost

.. literalinclude:: examples/xgboost_starter.py
:language: python
:start-after: __air_xgb_train_start__
:end-before: __air_xgb_train_end__

.. group-tab:: Pytorch

.. literalinclude:: examples/pytorch_tabular_starter.py
:language: python
:start-after: __air_pytorch_train_start__
:end-before: __air_pytorch_train_end__

.. group-tab:: Tensorflow

.. literalinclude:: examples/tf_tabular_starter.py
:language: python
:start-after: __air_tf_train_start__
:end-before: __air_tf_train_end__

.. _air-getting-started-tuning:

Hyperparameter Tuning
~~~~~~~~~~~~~~~~~~~~~

You can specify a hyperparameter space to search over for each trainer:

.. tabs::

.. group-tab:: XGBoost

.. literalinclude:: examples/xgboost_starter.py
:language: python
:start-after: __air_xgb_tuner_start__
:end-before: __air_xgb_tuner_end__

.. group-tab:: Pytorch

.. literalinclude:: examples/pytorch_tabular_starter.py
:language: python
:start-after: __air_pytorch_tuner_start__
:end-before: __air_pytorch_tuner_end__

.. group-tab:: Tensorflow

.. literalinclude:: examples/tf_tabular_starter.py
:language: python
:start-after: __air_tf_tuner_start__
:end-before: __air_tf_tuner_end__

Then use the ``Tuner`` to run the search:

.. literalinclude:: examples/pytorch_tabular_starter.py
:language: python
:start-after: __air_tune_generic_start__
:end-before: __air_tune_generic_end__

Batch Inference
~~~~~~~~~~~~~~~

After running the steps in :ref:`Training <air-getting-started-training>` or
:ref:`Tuning <air-getting-started-tuning>`, use the trained model for scalable batch
prediction with :meth:`Dataset.map_batches() <ray.data.Dataset.map_batches>`.

To learn more, see :ref:`End-to-end: Offline Batch Inference <batch_inference_home>`.


Project Status
--------------

AIR is currently in **beta**. If you have questions for the team or are interested in getting involved in the development process, fill out `this short form <https://forms.gle/wCCdbaQDtgErYycT6>`__.

For an overview of the AIR libraries, ecosystem integrations, and their readiness, check out the latest :ref:`AIR ecosystem map <air-ecosystem-map>`.

Next Steps
----------

- :ref:`air-key-concepts`
- :ref:`air-examples-ref`
- :ref:`API reference <air-api-ref>`
- :ref:`Technical whitepaper <whitepaper>`
- To check how your application is doing, you can use the :ref:`Ray dashboard<observability-getting-started>`.
>>>>>>> c89220e4b1327aff493423611e031871197243c9
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.