This repository contains the Pytorch implementation of Online Deicsion Transformer by Qinqing Zheng, Amy Zhang, and Aditya Grover.
If you use this code for your research, please cite us as:
@article{zheng2022online,
title={Online decision transformer},
author={Zheng, Qinqing and Zhang, Amy and Grover, Aditya},
journal={arXiv preprint arXiv:2202.05607},
year={2022}
}conda env create -f conda_env.yml
source activate odtIf you encounter the libstdc++.so.6: version 'GLIBCXX_3.4.xx' not found error, the following command might help:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<path-to-your-conda-env>/libI have also found that tensorboard wants protobuf version to be 3.20.x, and this helped
# you might need to uninstall dm-control
pip3 install --upgrade protobuf==3.20.0 To train an ODT agent for hopper with the medium-v2 dataset:
python main.pyThis will produce the exp folder, where all the outputs are going to be logged including tensorboard blobs. One can attach a tensorboard to monitor training by running:
tensorboard --logdir expThe majority of online-dt is licensed under CC-BY-NC, however portions of the project are available under separate license terms:
- D4RL dataset - Creative Commons Attribution 4.0 License (CC-BY)
- D4RL code, transformers, Lamb - Apache 2.0 License
- stable-baselines3, Gym, decision-transformer - MIT License