Skip to content

Instantly share code, notes, and snippets.

@ericl
Last active March 18, 2018 22:35
Show Gist options
  • Save ericl/d418cb84c0d7186a8b04ea362d82ecf3 to your computer and use it in GitHub Desktop.
Save ericl/d418cb84c0d7186a8b04ea362d82ecf3 to your computer and use it in GitHub Desktop.
First install Ray: http://ray.readthedocs.io/en/latest/installation.html
For Ape-X support, you'll want to install the latest version.
Run APEX in local mode with 4 workers (to use a GPU, add --resources='{"gpu": 1}')
$ cd ray/python/ray/rllib
$ ./train.py --env=PongNoFrameskip-v4 --run=APEX --config='{"num_workers": 4, "timesteps_per_iteration": 5000}'
Run on a cluster with 1 GPU + 32 workers
For cluster setup instructions see http://ray.readthedocs.io/en/latest/autoscaling.html
$ ./train.py -f tuned_examples/pong-apex.yaml --redis-address=localhost:6379
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment