Datasets:

Modalities:
Image
Size:
< 1K
ArXiv:
Libraries:
Datasets
License:
LTL07 commited on
Commit
31f565e
·
verified ·
1 Parent(s): 2269693

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +133 -3
README.md CHANGED
@@ -1,3 +1,133 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ ---
4
+ <div align="center">
5
+ <div style="margin-bottom: 30px">
6
+ <div style="display: flex; flex-direction: column; align-items: center; gap: 8px">
7
+ <h1 align="center" style="margin: 0; line-height: 1;">
8
+ <span style="font-size: 48px; font-weight: 600;">PSEC</span>
9
+ </h1>
10
+ </div>
11
+ <h2 style="font-size: 32px; margin: 20px 0;">Skill Expansion and Composition in Parameter Space</h2>
12
+ <h4 style="color: #666; margin-bottom: 25px;">International Conference on Learning Representation (ICLR), 2025</h4>
13
+ <p align="center" style="margin: 20px 0;">
14
+ <a href="https://arxiv.org/abs/2502.05932">
15
+ <img src="https://img.shields.io/badge/arXiv-2502.05932-b31b1b.svg">
16
+ </a>
17
+ <!-- &nbsp;&nbsp; -->
18
+ <a href="https://ltlhuuu.github.io/PSEC/">
19
+ <img src="https://img.shields.io/badge/🌐_Project_Page-PSEC-blue.svg">
20
+ </a>
21
+ <!-- &nbsp;&nbsp; -->
22
+ <a href="https://arxiv.org/pdf/2502.05932.pdf">
23
+ <img src="https://img.shields.io/badge/📑_Paper-PSEC-green.svg">
24
+ </a>
25
+ </p>
26
+ </div>
27
+ </div>
28
+
29
+ <div align="center">
30
+ <p style="font-size: 20px; font-weight: 600; margin-bottom: 20px;">
31
+ 🔥 Official Implementation
32
+ </p>
33
+ <p style="font-size: 18px; max-width: 800px; margin: 0 auto;">
34
+ <b>PSEC</b> is a novel framework designed to:
35
+ </p>
36
+ </div>
37
+ <div align="center">
38
+ <p style="font-size: 15px; font-weight: 600; margin-bottom: 20px;">
39
+ 🚀 <b>Facilitate</b> efficient and flexible skill expansion and composition <br>
40
+ 🔄 <b>Iteratively evolve</b> the agents' capabilities<br>
41
+ ⚡ <b>Efficiently address</b> new challenges
42
+ </p>
43
+ </div>
44
+
45
+ <p align="center">
46
+ <img src="assets/intro.png" width="800" style="margin: 40px 0;">
47
+ </p>
48
+ <!-- <div align="center">
49
+ <a href="https://github.com/ltlhuuu/PSEC/stargazers">
50
+ <img src="https://img.shields.io/github/stars/ltlhuuu/PSEC?style=social" alt="GitHub stars">
51
+ </a>
52
+ &nbsp;
53
+ <a href="https://github.com/ltlhuuu/PSEC/network/members">
54
+ <img src="https://img.shields.io/github/forks/ltlhuuu/PSEC?style=social" alt="GitHub forks">
55
+ </a>
56
+ &nbsp;
57
+ <a href="https://github.com/ltlhuuu/PSEC/issues">
58
+ <img src="https://img.shields.io/github/issues/ltlhuuu/PSEC?style=social" alt="GitHub issues">
59
+ </a>
60
+ </div> -->
61
+
62
+
63
+ ## Quick start
64
+ Clone this repository and navigate to PSEC folder
65
+ ```python
66
+ git clone https://github.com/ltlhuuu/PSEC.git
67
+ cd PSEC
68
+ ```
69
+ ## Environment Installation
70
+ Environment configuration and dependencies are available in environment.yaml and requirements.txt.
71
+
72
+ Create conda environment for this experiments
73
+ ```python
74
+ conda create -n PSEC python=3.9
75
+ conda activate PSEC
76
+ ```
77
+ Then install the remaining requirements (with MuJoCo already downloaded, if not see [here](#MuJoCo-installation)):
78
+ ```bash
79
+ pip install -r requirements.txt
80
+ ```
81
+
82
+ Install the `MetaDrive` environment via
83
+ ```python
84
+ pip install git+https://github.com/HenryLHH/metadrive_clean.git@main
85
+ ```
86
+ ### MuJoCo installation
87
+ Download MuJoCo:
88
+ ```bash
89
+ mkdir ~/.mujoco
90
+ cd ~/.mujoco
91
+ wget https://github.com/google-deepmind/mujoco/releases/download/2.1.0/mujoco210-linux-x86_64.tar.gz
92
+ tar -zxvf mujoco210-linux-x86_64.tar.gz
93
+ cd mujoco210
94
+ wget https://www.roboti.us/file/mjkey.txt
95
+ ```
96
+ Then add the following line to `.bashrc`:
97
+ ```
98
+ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/.mujoco/mujoco210/bin
99
+ ```
100
+ ## Run experiments
101
+ ### Pretrain
102
+ Pretrain the model with the following command. Meanwhile there are pre-trained models, you can download them from [here](https://drive.google.com/drive/folders/1lpcShmYoKVt4YMH66JBiA0MhYEV9aEYy?usp=sharing).
103
+ ```python
104
+ export XLA_PYTHON_CLIENT_PREALLOCATE=False
105
+ CUDA_VISIBLE_DEVICES=0 python launcher/examples/train_pretrain.py --variant 0 --seed 0
106
+ ```
107
+ ### LoRA finetune
108
+ Train the skill policies with LoRA to achieve skill expansion. Meanwhile there are pre-trained models, you can download them from [here](https://drive.google.com/drive/folders/1lpcShmYoKVt4YMH66JBiA0MhYEV9aEYy?usp=sharing).
109
+ ```python
110
+ CUDA_VISIBLE_DEVICES=0 python launcher/examples/train_lora_finetune.py --com_method 0 --model_cls 'LoRALearner' --variant 0 --seed 0
111
+ ```
112
+ ### Context-aware Composition
113
+ Train the context-aware modular to adaptively leverage different skill knowledge to solve the tasks. You can download the pretrained model and datasets from [here](https://drive.google.com/drive/folders/1lpcShmYoKVt4YMH66JBiA0MhYEV9aEYy?usp=sharing). Then, run the following command,
114
+ ```python
115
+ CUDA_VISIBLE_DEVICES=0 python launcher/examples/train_lora_finetune.py --com_method 0 --model_cls 'LoRASLearner' --variant 0 --seed 0
116
+ ```
117
+
118
+ ## Citations
119
+ If you find our paper and code useful for your research, please cite:
120
+ ```
121
+ @inproceedings{
122
+ liu2025psec,
123
+ title={Skill Expansion and Composition in Parameter Space},
124
+ author={Tenglong Liu, Jianxiong Li, Yinan Zheng, Haoyi Niu, Yixing Lan, Xin Xu, Xianyuan Zhan},
125
+ booktitle={The Thirteenth International Conference on Learning Representations},
126
+ year={2025},
127
+ url={https://openreview.net/forum?id=GLWf2fq0bX}
128
+ }
129
+ ```
130
+
131
+ ## Acknowledgements
132
+
133
+ Parts of this code are adapted from [IDQL](https://github.com/philippe-eecs/IDQL).