-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[RLlib; docs] Redo rllib-algorithms.rst
page.
#46916
[RLlib; docs] Redo rllib-algorithms.rst
page.
#46916
Conversation
…_redo_algorithms_page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. SOme nits here and there. The descriptions are actually really good. Short, precise, straight-to-the-point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The gym.vector
might led users to believe that this holds for SARL and MARL while the latter does not support vector envs, yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good catch. I think, we'll have to fix this limitation on MAEnvRunner soon :|
rllib/algorithms/ppo/ppo.py
Outdated
config.training( | ||
gamma=0.9, lr=0.01, kl_coeff=0.3, train_batch_size_per_learner=256 | ||
) | ||
config.resources(num_gpus=0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still ambiguous. We have num_gpus
in resources
, num_gpus_per_learner
in learners
and num_gpus_per_env_runner
. What is this gpu
for? Is it a gpu for the driver? Is it the total number of gpus available to env runners and learners?
+-----------------------------------------------------------------------------+------------------------------+------------------------------------+--------------------------------+ | ||
| **On-Policy** | | ||
+-----------------------------------------------------------------------------+------------------------------+------------------------------------+--------------------------------+ | ||
| :ref:`PPO (Proximal Policy Optimization) <ppo>` | |single_agent| |multi_agent| | |multi_gpu| |multi_node_multi_gpu| | |cont_actions| |discr_actions| | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make more clear, what is the difference between multi-gpu and multi-node-multi-gpu.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
+-----------------------------------------------------------------------------+------------------------------+------------------------------------+--------------------------------+ | ||
| :ref:`DQN/Rainbow (Deep Q Networks) <dqn>` | |single_agent| |multi_agent| | |multi_gpu| |multi_node_multi_gpu| | |discr_actions| | | ||
+-----------------------------------------------------------------------------+------------------------------+------------------------------------+--------------------------------+ | ||
| :ref:`SAC (Soft Actor Critic) <sac>` | |single_agent| |multi_agent| | |multi_gpu| |multi_node_multi_gpu| | |cont_actions| | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's actually not correct. Mulit-learner settings are not available for SAC - due to the multiple optimizers per learner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
**PPO architecture:** In a training iteration, PPO performs three major steps: sampling a set of episodes or episode fragments (1), | ||
converting these into a train batch and updating the model(s) using a clipped objective and multiple SGD passes over this batch (2), | ||
and synching the weights from the Learners back to the EnvRunners (3). | ||
PPO scales out on both axes, supporting multiple EnvRunners for sample collection and multiple GPU- or CPU-based Learner |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe Learner-S
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
`Rainbow configuration <https://github.com/ray-project/ray/blob/master/rllib/tuned_examples/dqn/pong-rainbow.yaml>`__, | ||
`{BeamRider,Breakout,Qbert,SpaceInvaders}NoFrameskip-v4 <https://github.com/ray-project/ray/blob/master/rllib/tuned_examples/dqn/atari-dqn.yaml>`__, | ||
`with Dueling and Double-Q <https://github.com/ray-project/ray/blob/master/rllib/tuned_examples/dqn/atari-duel-ddqn.yaml>`__, | ||
`with Distributional DQN <https://github.com/ray-project/ray/blob/master/rllib/tuned_examples/dqn/atari-dist-dqn.yaml>`__. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we want to mention the rainbow architecture earlier above.
Tuned examples (continuous actions): | ||
`Pendulum-v1 <https://github.com/ray-project/ray/blob/master/rllib/tuned_examples/sac/pendulum-sac.yaml>`__, | ||
`HalfCheetah-v3 <https://github.com/ray-project/ray/blob/master/rllib/tuned_examples/sac/halfcheetah-sac.yaml>`__, | ||
Tuned examples (discrete actions): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discrete actions are not implemented in the new stack.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True! Good catch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The table has this correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah alright. Must have overseen it there.
…_redo_algorithms_page Signed-off-by: sven1977 <svenmika1977@gmail.com> # Conflicts: # rllib/examples/curiosity/inverse_dynamics_model_based_curiosity.py # rllib/examples/learners/classes/curiosity_ppo_torch_learner.py
…ped the experiment). - maybe try to speed up things by increasing batch size and lrs. Signed-off-by: sven1977 <svenmika1977@gmail.com>
…_redo_algorithms_page
…ped the experiment). - maybe try to speed up things by increasing batch size and lrs. Signed-off-by: sven1977 <svenmika1977@gmail.com>
…_redo_algorithms_page
Redo
rllib-algorithms.rst
page.Why are these changes needed?
Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.