From 668f555755602fc42a114b0469c956b33b8cb1e1 Mon Sep 17 00:00:00 2001 From: Eric Liang Date: Thu, 6 Aug 2020 18:29:04 -0700 Subject: [PATCH] [rllib] Clean up outdated docs #9915 --- doc/source/rllib-toc.rst | 2 -- doc/source/rllib.rst | 4 ++-- rllib/policy/policy.py | 5 ++++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/source/rllib-toc.rst b/doc/source/rllib-toc.rst index 4210d9a50..0dcbea76d 100644 --- a/doc/source/rllib-toc.rst +++ b/doc/source/rllib-toc.rst @@ -195,8 +195,6 @@ If you encounter errors like try setting ``OMP_NUM_THREADS=1``. Similarly, check configured system limits with `ulimit -a` for other resource limit errors. -If you encounter out-of-memory errors, consider setting ``redis_max_memory`` and ``object_store_memory`` in ``ray.init()`` to reduce memory usage. - For debugging unexpected hangs or performance problems, you can run ``ray stack`` to dump the stack traces of all Ray workers on the current node, ``ray timeline`` to dump a timeline visualization of tasks to a file, and ``ray memory`` to list all object diff --git a/doc/source/rllib.rst b/doc/source/rllib.rst index eb60390bc..0f7fd7cd1 100644 --- a/doc/source/rllib.rst +++ b/doc/source/rllib.rst @@ -38,7 +38,7 @@ Then, you can try out training in the following equivalent ways: from ray import tune from ray.rllib.agents.ppo import PPOTrainer tune.run(PPOTrainer, config={"env": "CartPole-v0"}) # "log_level": "INFO" for verbose, - # "framework": "tfe" for tf-eager, + # "framework": "tfe"/"tf2" for eager, # "framework": "torch" for PyTorch Next, we'll cover three key concepts in RLlib: Policies, Samples, and Trainers. @@ -92,7 +92,7 @@ Policies each define a ``learn_on_batch()`` method that improves the policy give - Simple `policy gradient loss `__ - Simple `Q-function loss `__ -- Importance-weighted `APPO surrogate loss `__ +- Importance-weighted `APPO surrogate loss `__ RLlib `Trainer classes `__ coordinate the distributed workflow of running rollouts and optimizing policies. They do this by leveraging Ray `parallel iterators `__ to implement the desired computation pattern. The following figure shows *synchronous sampling*, the simplest of `these patterns `__: diff --git a/rllib/policy/policy.py b/rllib/policy/policy.py index 580f0bf41..15380e2d4 100644 --- a/rllib/policy/policy.py +++ b/rllib/policy/policy.py @@ -36,7 +36,10 @@ class Policy(metaclass=ABCMeta): graphs and multi-GPU support. Attributes: - observation_space (gym.Space): Observation space of the policy. + observation_space (gym.Space): Observation space of the policy. For + complex spaces (e.g., Dict), this will be flattened version of the + space, and you can access the original space via + ``observation_space.original_space``. action_space (gym.Space): Action space of the policy. exploration (Exploration): The exploration object to use for computing actions, or None.