From 91d55f52abb44045ee74b232a582c295becdf49c Mon Sep 17 00:00:00 2001 From: Richard Liaw Date: Thu, 11 Jun 2020 11:23:36 -0700 Subject: [PATCH] [docs] Why Tune? (#8790) Co-authored-by: Sumanth Ratna --- doc/source/index.rst | 6 ++--- doc/source/tune.rst | 26 +++++++++------------ doc/source/tune/_tutorials/overview.rst | 12 ++++++++++ doc/source/tune/why_tune.rst | 30 +++++++++++++++++++++++++ 4 files changed, 55 insertions(+), 19 deletions(-) create mode 100644 doc/source/tune/why_tune.rst diff --git a/doc/source/index.rst b/doc/source/index.rst index 4ed73de63..425edafe7 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -42,10 +42,10 @@ Ray uses Tasks (functions) and Actors (Classes) to allow you to parallelize your The Ray Community ----------------- -Ray is more than a framework for distributed applications but also an active community of developers, -researchers, and folks that love machine learning. +Ray is more than a framework for distributed applications but also an active community of developers, +researchers, and folks that love machine learning. -You can join (and Star!) us on `on GitHub`_. +You can join (and Star!) us on `on GitHub`_. You can also join `community slack `_ to discuss Ray! The community is extremely active in helping people succeed in building their ray applications. You can also get started by visiting our `Tutorials `_. For the latest wheels (nightlies), see the `installation page `__. diff --git a/doc/source/tune.rst b/doc/source/tune.rst index 30514cc45..c6da56c5d 100644 --- a/doc/source/tune.rst +++ b/doc/source/tune.rst @@ -11,9 +11,8 @@ Tune is a Python library for experiment execution and hyperparameter tuning at a * Launch a multi-node :ref:`distributed hyperparameter sweep ` in less than 10 lines of code. * Supports any machine learning framework, :ref:`including PyTorch, XGBoost, MXNet, and Keras`. - * Natively :ref:`integrates with optimization libraries ` such as `HyperOpt `_, `Bayesian Optimization `_, and `Facebook Ax `_. - * Choose among :ref:`scalable algorithms ` such as :ref:`Population Based Training (PBT) `, :ref:`Vizier's Median Stopping Rule `, :ref:`HyperBand/ASHA `. - * Visualize results with `TensorBoard `__. + * Automatically manages ref:`checkpoints `_ and logging to `TensorBoard `__. + * Choose among state of the art algorithms such as :ref:`Population Based Training (PBT) `, :ref:`BayesOptSearch `, :ref:`HyperBand/ASHA `. * Move your models from training to serving on the same infrastructure with `Ray Serve`_. .. _`Ray Serve`: rayserve/overview.html @@ -52,9 +51,16 @@ If using TF2 and TensorBoard, Tune will also automatically generate TensorBoard .. tip:: Join the `Ray community slack `_ to discuss Ray Tune (and other Ray libraries)! -Guides/Materials +Why choose Tune? ---------------- +There are many other hyperparameter optimization libraries out there. If you're new to Tune, you're probably wondering, "what makes Tune different?" + +.. include:: tune/why_tune.rst + +Reference Materials +------------------- + Here are some reference materials for Tune: * :ref:`Tune Tutorials, Guides, and Examples ` @@ -69,18 +75,6 @@ Below are some blog posts and talks about Tune: - [video] `Talk given at RISECamp 2018 `_ - [video] `A Guide to Modern Hyperparameter Optimization (PyData LA 2019) `_ (`slides `_) -Open Source Projects using Tune -------------------------------- - -Here are some of the popular open source repositories and research projects that leverage Tune. Feel free to submit a pull-request adding (or requesting a removal!) of a listed project. - - - `Softlearning `_: Softlearning is a reinforcement learning framework for training maximum entropy policies in continuous domains. Includes the official implementation of the Soft Actor-Critic algorithm. - - `Flambe `_: An ML framework to accelerate research and its path to production. See `flambe.ai `_. - - `Population Based Augmentation `_: Population Based Augmentation (PBA) is a algorithm that quickly and efficiently learns data augmentation functions for neural network training. PBA matches state-of-the-art results on CIFAR with one thousand times less compute. - - `Fast AutoAugment by Kakao `_: Fast AutoAugment (Accepted at NeurIPS 2019) learns augmentation policies using a more efficient search strategy based on density matching. - - `Allentune `_: Hyperparameter Search for AllenNLP from AllenAI. - - `machinable `_: A modular configuration system for machine learning research. See `machinable.org `_. - Citing Tune ----------- diff --git a/doc/source/tune/_tutorials/overview.rst b/doc/source/tune/_tutorials/overview.rst index f0fe3f099..a66ce8020 100644 --- a/doc/source/tune/_tutorials/overview.rst +++ b/doc/source/tune/_tutorials/overview.rst @@ -176,3 +176,15 @@ Contributed Examples - `pbt_tune_cifar10_with_keras `__: A contributed example of tuning a Keras model on CIFAR10 with the PopulationBasedTraining scheduler. - `genetic_example `__: Optimizing the michalewicz function using the contributed GeneticSearch algorithm with AsyncHyperBandScheduler. - `tune_cifar10_gluon `__: MXNet Gluon example to use Tune with the function-based API on CIFAR-10 dataset. + +Open Source Projects using Tune +------------------------------- + +Here are some of the popular open source repositories and research projects that leverage Tune. Feel free to submit a pull-request adding (or requesting a removal!) of a listed project. + + - `Softlearning `_: Softlearning is a reinforcement learning framework for training maximum entropy policies in continuous domains. Includes the official implementation of the Soft Actor-Critic algorithm. + - `Flambe `_: An ML framework to accelerate research and its path to production. See `flambe.ai `_. + - `Population Based Augmentation `_: Population Based Augmentation (PBA) is a algorithm that quickly and efficiently learns data augmentation functions for neural network training. PBA matches state-of-the-art results on CIFAR with one thousand times less compute. + - `Fast AutoAugment by Kakao `_: Fast AutoAugment (Accepted at NeurIPS 2019) learns augmentation policies using a more efficient search strategy based on density matching. + - `Allentune `_: Hyperparameter Search for AllenNLP from AllenAI. + - `machinable `_: A modular configuration system for machine learning research. See `machinable.org `_. diff --git a/doc/source/tune/why_tune.rst b/doc/source/tune/why_tune.rst new file mode 100644 index 000000000..1bd1d9db1 --- /dev/null +++ b/doc/source/tune/why_tune.rst @@ -0,0 +1,30 @@ +Tune offers cutting-edge optimization algorithms. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +As a user, you're probably looking into hyperparameter optimization because you want to quickly increase your model performance. + +Tune enables you to leverage a variety of these cutting edge optimization algorithms, reducing the cost of tuning by `aggressively terminating bad hyperparameter evaluations `_, intelligently :ref:`choosing better parameters to evaluate `, or even :ref:`changing the hyperparameters during training ` to optimize hyperparameter schedules. + +Tune simplifies your workflow. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A key problem with machine learning frameworks is the need to restructure all of your code to fit the framework. + +With Tune, you can optimize your model just by :ref:`adding a few code snippets `. + +Further, Tune actually removes boilerplate from your code training workflow, automatically :ref:`managing checkpoints ` and :ref:`logging results to tools ` such as MLFlow and TensorBoard. + + +Tune provides first-class multi-GPU & distributed training support. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Hyperparameter tuning is known to be highly time-consuming, so it is often necessary to parallelize this process. Most other tuning frameworks require you to implement your own multi-process framework or build your own distributed system to speed up hyperparameter tuning. + +However, Tune allows you to transparently :ref:`parallelize across multiple GPUs and multiple nodes `. Tune even has seamless :ref:`fault tolerance and cloud support `, allowing you to scale up your hyperparameter search by 100x while reducing costs by up to 10x by using cheap preemptible instances. + +What if I'm already doing hyperparameter tuning? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You might be already using an existing hyperparameter tuning tool such as HyperOpt or Bayesian Optimization. + +In this situation, Tune actually allows you to power up your existing workflow. Tune's :ref:`Search Algorithms ` integrate with a variety of popular hyperparameter tuning libraries (such as Nevergrad or HyperOpt) and allow you to seamlessly scale up your optimization process -- without sacrificing performance.