diff --git a/doc/source/examples.rst b/doc/source/examples.rst deleted file mode 100644 index c6423eb66..000000000 --- a/doc/source/examples.rst +++ /dev/null @@ -1,14 +0,0 @@ -Examples -======== - -MapReduce ---------- - -Parameter Server ----------------- - -Deep Learning -------------- - -Asynchronous Advantage Actor-Critic (A3C) ------------------------------------------ diff --git a/doc/source/index.rst b/doc/source/index.rst index d48cf1f43..a9f58db24 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -70,27 +70,27 @@ Tune Quick Start `Tune`_ is a scalable framework for hyperparameter search built on top of Ray with a focus on deep learning and deep reinforcement learning. -.. code-block:: python +.. note:: - import torch.optim as optim - from ray import tune - from ray.tune.examples.mnist_pytorch import get_data_loaders, Net, train, test + To run this example, you will need to install the following: - def train_mnist(config): - train_loader, test_loader = get_data_loaders() - model = Net(config) - optimizer = optim.SGD(model.parameters(), lr=config["lr"]) - for i in range(10): - train(model, optimizer, train_loader) - acc = test(model, test_loader) - tune.track.log(mean_accuracy=acc) + .. code-block:: bash - analysis = tune.run( - train_mnist, - stop={"mean_accuracy": 0.98}, - config={"lr": tune.grid_search([0.001, 0.01, 0.1])}) + $ pip install ray torch torchvision filelock - print("Best config: ", analysis.get_best_config()) + +This example runs a small grid search to train a CNN using PyTorch and Tune. + +.. literalinclude:: ../../python/ray/tune/tests/example.py + :language: python + :start-after: __quick_start_begin__ + :end-before: __quick_start_end__ + +If TensorBoard is installed, automatically visualize all trial results: + +.. code-block:: bash + + tensorboard --logdir ~/ray_results .. _`Tune`: tune.html @@ -171,7 +171,6 @@ The following are good places to discuss Ray. advanced.rst troubleshooting.rst package-ref.rst - examples.rst .. toctree:: :maxdepth: 1 diff --git a/doc/source/inspect.rst b/doc/source/inspect.rst index bdc3bf188..469ef7bac 100644 --- a/doc/source/inspect.rst +++ b/doc/source/inspect.rst @@ -40,7 +40,7 @@ To get information about the current nodes in your cluster, you can use ``ray.no :noindex: -.. code-block:: ipython3 +.. code-block:: python >>> import ray >>> ray.init() diff --git a/rllib_doc/index.rst b/rllib_doc/index.rst deleted file mode 100644 index bb995d56a..000000000 --- a/rllib_doc/index.rst +++ /dev/null @@ -1,17 +0,0 @@ -Ray -=== - -.. toctree:: - :maxdepth: 1 - :caption: RLlib - - rllib.rst - rllib-training.rst - rllib-env.rst - rllib-models.rst - rllib-algorithms.rst - rllib-offline.rst - rllib-concepts.rst - rllib-examples.rst - rllib-dev.rst - rllib-package-ref.rst