Giter VIP home page Giter VIP logo

distributed_rl's Introduction

distributed_rl

This is pytorch implementation of distributed deep reinforcement learning.

image

actors

System

In our system, there are two processes, Actor and Learner. In Learner process, thread of the replay memory runs at the same time, and these processes communicate using Redis.

system

Install

git clone https://github.com/neka-nat/distributed_rl.git
cd distributed_rl
poetry install

Install redis-server.

sudo apt-get install redis-server

Setting Atari. https://github.com/openai/atari-py#roms

Run

The following command is running all actors and learner in localhost. The number of actor's processes is given as an argument.

poetry shell
./run.sh 4

Run r2d2 mode.

./run.sh 4 config/all_r2d2.conf

Docker build

cd distributed_rl
docker build -t distributed_rl:1.0 .

Use AWS

Create AMI.

packer build packer/ubuntu.json

Create key-pair.

aws ec2 create-key-pair --key-name key --query 'KeyMaterial' --output text > ~/.ssh/key.pem
chmod 400 ~/.ssh/key.pem

Run instances.

cd aws
python aws_run_instances.py aws_config.yaml

Run fabric for a learner.

fab -H <Public IP of learner's instance> -u ubuntu -i ~/.ssh/key.pem learner_run

Run fabric for actors.

fab -H <Public IP of actor's instance 1>,<Public IP of actor's instance 2>, ... -u ubuntu -i ~/.ssh/key.pem actor_run:num_proc=15,leaner_host=<Public IP of learner's instance>

distributed_rl's People

Contributors

neka-nat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.