RLlib: Scalable Reinforcement Learning

RLlib is an open-source library for reinforcement learning that offers both a collection of reference algorithms and scalable primitives for composing new ones.

_images/rllib-stack.svg

Learn more about RLlib’s design by reading the ICML paper.

Installation

RLlib has extra dependencies on top of ray. First, you’ll need to install either PyTorch or TensorFlow. Then, install the RLlib module:

pip install tensorflow  # or tensorflow-gpu
pip install ray[rllib]

You might also want to clone the Ray repo for convenient access to RLlib helper scripts:

git clone https://github.com/ray-project/ray
cd ray/python/ray/rllib

Troubleshooting

If you encounter errors like blas_thread_init: pthread_create: Resource temporarily unavailable when using many workers, try setting OMP_NUM_THREADS=1. Similarly, check configured system limits with ulimit -a for other resource limit errors.

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. This requires py-spy to be installed.