Giter Club home page Giter Club logo

proto's Introduction

Proto-RL: Reinforcement Learning with Prototypical Representations

This is a PyTorch implementation of Proto-RL from

Reinforcement Learning with Prototypical Representations by

Denis Yarats, Rob Fergus, Alessandro Lazaric, Lerrel Pinto.

[Paper]

Citation

If you use this repo in your research, please consider citing the paper as follows

@article{yarats2021proto,
    title={Reinforcement Learning with Prototypical Representations},
    author={Denis Yarats and Rob Fergus and Alessandro Lazaric and Lerrel Pinto},
    year={2021},
    eprint={2102.11271},
    archivePrefix={arXiv},
    primaryClass={cs.ML}
}

Requirements

We assume you have access to a gpu that can run CUDA 11. Then, the simplest way to install all required dependencies is to create an anaconda environment by running

conda env create -f conda_env.yml

After the instalation ends you can activate your environment with

conda activate proto

Instructions

In order to pretrain the agent you need to specify the number of task-agnostic environment steps by setting num_expl_steps, after that many steps, the agent will start receving the downstream task reward until it takes num_train_steps in total. For example, to pre-train the Proto-RL agent on Cheetah Run task unsupervisely for 500k environment steps and then train it further with the downstream reward for another 500k steps, you can run:

python train.py env=cheetah_run num_expl_steps=250000 num_train_steps=500000

Note that we divide the number of steps by action repeat, which is set to 2 for all the environments.

This will produce the exp_local folder, where all the outputs are going to be stored including train/eval logs, tensorboard blobs, and evaluation episode videos. To launch tensorboard run

tensorboard --logdir exp_local

proto's People

Contributors

bamos avatar denisyarats avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

proto's Issues

Error when running example code

I keep getting the error
Error in magma_getdevice_arch: MAGMA not initialized (call magma_init() first) or bad device
when running the example training code. I switched to different machines and the error persists. Any ideas on how to resolve this? Thanks!

Multi-task Environments

Thanks for open-sourcing this! In the paper (arXiv 2102.11271), there are experiments in multi-task setting (Walker-Run Forward&Run Backward&Flip Forward&Flip Backward, and Reach-Duplo Top Left&Top Right&Bottom Left&Bottom Right). How can I obtain these environments? Thanks a lot!

reproducing results for walker run

Thanks for open sourcing this! I wanted to replicate the results on the walker run task.
To reproduce the results of the paper, it is sufficient to run
python train.py env=walker_run num_expl_steps=250000 num_train_steps=250000?

Error using hydra-core 1.0

By installing hydra by
pip install hydra-core --upgrade The following error arises:

Key 'name' not in 'HydraConf'
        full_key: hydra.name
        reference_type=Optional[HydraConf]
        object_type=HydraConf

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.