Skip to content

Instantly share code, notes, and snippets.

@ericl
Last active March 17, 2018 04:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericl/8f6f15a16ebe100d85e20f83059fc3b9 to your computer and use it in GitHub Desktop.
Save ericl/8f6f15a16ebe100d85e20f83059fc3b9 to your computer and use it in GitHub Desktop.
# Install Ray
$ pip install -U ray[rllib]
# Go to the rllib scripts directory
$ git clone git@github.com:ray-project/ray.git && cd ray/python/ray/rllib
# Run in local mode with reduced num workers (to use a GPU, add --resources='{"gpu": 1}')
$ ./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 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