Git Product home page Git Product logo

prompt-dt's Introduction

Prompting Decisicion Transformer for Few-Shot Policy Generalization

Official code repository for Prompt-DT. [website][paper]

Prompt-DT Architecture:

Teaser

Installation

We tested the code in Ubuntu 20.04.

  • We recommend using Anaconda to create a virtual environment.
conda create --name prompt-dt python=3.8.5
conda activate prompt-dt
  • Our experiments require MuJoCo as well as mujoco-py. Install them by following the instructions in the mujoco-py repo.

  • Install environments and dependencies with the following commands:

# install dependencies
pip install -r requirements.txt

# install environments
./install_envs.sh

Download Datasets

wget -O data.zip 'https://drive.google.com/uc?export=download&id=1rZufm-XRq1Ig-56DejkQUX1si_WzCGBe&confirm=True' 
unzip data.zip
rm data.zip
  • Organize folders as follows.
.
├── config
├── data
│   ├── ant_dir
│   ├── cheetah_dir
│   ├── cheetah_vel
│   └── ML1-pick-place-v2
├── envs
├── prompt_dt
└── ...

Run Experiments

# Prompt-DT
python pdt_main.py --env cheetah_dir # choices:['cheetah_dir', 'cheetah_vel', 'ant_dir', 'ML1-pick-place-v2']

# Prompt-MT-BC
python pdt_main.py --no-rtg --no-r

# MT-ORL
python pdt_main.py --no-prompt

# MT-BC-Finetune
python pdt_main.py --no-prompt --no-rtg --no-r --finetune

Acknowledgements

The code for prompt-dt is based on decision-transformer. We build environments based on repos including macaw, rand_param_envs, and metaworld.

References

If you find our code helpful for your research, please consider citing the paper!

@inproceedings{xu2022prompting,
  title={Prompting Decision Transformer for Few-Shot Policy Generalization},
  author={Xu, Mengdi and Shen, Yikang and Zhang, Shun and Lu, Yuchen and Zhao, Ding and Tenenbaum, Joshua and Gan, Chuang},
  booktitle={International Conference on Machine Learning},
  pages={24631--24645},
  year={2022},
  organization={PMLR}
}

Contributions

Suggestions for enhancing and improving the code are welcome. Please email [email protected] with comments and suggestions.

prompt-dt's People

Contributors

mxu34 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.