https://github.com/Josh00-Lu/DiffusionVeteran
Official PyTorch Implementation of "What Makes a Good Diffusion Planner for Decision Making?" [ICLR 2025 Spotlight]
https://github.com/Josh00-Lu/DiffusionVeteran
decison-making embodied-agent pytorch reinforcement-learning
Last synced: 3 months ago
JSON representation
Official PyTorch Implementation of "What Makes a Good Diffusion Planner for Decision Making?" [ICLR 2025 Spotlight]
- Host: GitHub
- URL: https://github.com/Josh00-Lu/DiffusionVeteran
- Owner: Josh00-Lu
- License: apache-2.0
- Created: 2025-02-11T11:44:41.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-03-02T04:04:40.000Z (3 months ago)
- Last Synced: 2025-03-02T05:17:56.416Z (3 months ago)
- Topics: decison-making, embodied-agent, pytorch, reinforcement-learning
- Language: Python
- Homepage:
- Size: 11.7 MB
- Stars: 11
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# What Makes a Good Diffusion Planner for Decision Making?
ยท
Paper
ยท
Code
ยท
OpenReviewThis repository contains the PyTorch implementation of *"What Makes a Good Diffusion Planner for Decision Making?"* (ICLR 2025, Spotlight)
![]()
## ๐ ๏ธ Setup
Let's start with python 3.9. It's recommend to create a `conda` env:### Create a new conda environment
```shell
conda create -n dv python=3.9 mesalib glew glfw pip=23 setuptools=63.2.0 wheel=0.38.4 protobuf=3.20 -c conda-forge -y
conda activate dv
```### Install for MuJoCo Simulator and mujoco-py (Important)
Install mujoco following the instruction [here](https://github.com/openai/mujoco-py#install-mujoco).Alternatively, run the following script for a quick setup:
```bash
#!/bin/bash
sudo apt-get update && sudo apt-get install -y wget tar libosmesa6-dev libgl1-mesa-glx libglfw3 patchelf cmake
sudo ln -s /usr/lib/x86_64-linux-gnu/libGL.so.1 /usr/lib/x86_64-linux-gnu/libGL.so
echo $USER_DIR
wget -c "https://mujoco.org/download/mujoco210-linux-x86_64.tar.gz"
mkdir -p /home/$USER_DIR/.mujoco
cp mujoco210-linux-x86_64.tar.gz /home/$USER_DIR/mujoco.tar.gz
rm mujoco210-linux-x86_64.tar.gz
mkdir -p /home/$USER_DIR/.mujoco
tar -zxvf /home/$USER_DIR/mujoco.tar.gz -C /home/$USER_DIR/.mujoco
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/$USER_DIR/.mujoco/mujoco210/bin" >> ~/.bashrc
echo "export MUJOCO_PY_MUJOCO_PATH=/home/$USER_DIR/.mujoco/mujoco210" >> ~/.bashrc
```### Install Dependencies
```bash
pip install -r requirements.txt
pip install -e .
```
For PyTorch installation, refer to the official PyTorch setup guide to ensure compatibility with your hardware.## ๐ป Training & Inference
### Run Diffusion Veteran
We provide a **single script** for easy execution of the training and inference tasksets. You can run the following commands to get started with different environments:
```bash
bash scripts/DV_antmaze_reimp.sh
bash scripts/DV_kitchen_reimp.sh
bash scripts/DV_maze2d_reimp.sh
bash scripts/DV_mujoco_reimp.sh
```### Try Different Configurations
To experiment with different configurations, simply modify the settings in scripts_templates/train_template.sh. This file allows you to easily adjust parameters for your experiments. Once youโve updated the configuration, run the following script:
```bash
bash scripts_templates/template.sh
```
This provides flexibility for trying different setups without needing to manually edit each script.## ๐ Acknowledgements
๐ Currently, Diffusion-Vetern is offically supported by [CleanDiffuser](https://github.com/CleanDiffuserTeam/CleanDiffuser). You are welcome to conduct unified ablation studies or standardized comparisons with the baselines in CleanDiffuser. Please see the [license](LICENSE) for further details.## ๐ Citation
If you find our work useful in your research, please consider citing:
```bibtex
@inproceedings{lu2025what,
title={What Makes a Good Diffusion Planner for Decision Making?},
author={Haofei Lu and Dongqi Han and Yifei Shen and Dongsheng Li},
booktitle={The Thirteenth International Conference on Learning Representations},
year={2025},
url={https://openreview.net/forum?id=7BQkXXM8Fy}
}
```
and also the CleanDiffuser:
```bibtex
@article{cleandiffuser,
author = {Zibin Dong and Yifu Yuan and Jianye Hao and Fei Ni and Yi Ma and Pengyi Li and Yan Zheng},
title = {CleanDiffuser: An Easy-to-use Modularized Library for Diffusion Models in Decision Making},
journal = {arXiv preprint arXiv:2406.09509},
year = {2024},
url = {https://arxiv.org/abs/2406.09509},
}
```## ๐ท๏ธ License
Please see the [license](LICENSE.txt) for more details.