Skip to content

Commit b7f3c49

Browse files
committed
update stupid folder name from dexiang to the folder names used in paper
1 parent ae730dc commit b7f3c49

File tree

5 files changed

+29
-29
lines changed

5 files changed

+29
-29
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Non-edge components (e.g., Policy Training, Model Arithmetic) have been tested o
8080

8181
### Hardware
8282

83-
For real-robot deployment (dual-arm setup, cameras, and table layout), see **[Hardware Setup & 3D Print Files](setup/README.md)**. That document covers supported platforms (Agilex Piper for FlattenFold / TeeShirtSort, ARX X5 for HangCloth), Intel RealSense D435i camera placement, 3D-printed grippers and mounts with usage notes, and inference host GPU (RTX 4090 in Ubuntu 20.04).
83+
For real-robot deployment (dual-arm setup, cameras, and table layout), see **[Hardware Setup & 3D Print Files](setup/README.md)**. That document covers supported platforms (Agilex Piper for Task_A / Task_B, ARX X5 for Task_C), Intel RealSense D435i camera placement, 3D-printed grippers and mounts with usage notes, and inference host GPU (RTX 4090 in Ubuntu 20.04).
8484

8585
## Installation
8686

@@ -116,11 +116,11 @@ Download the Kai0 dataset so it is available under `./data` for training and eva
116116
python scripts/download_dataset.py
117117
```
118118

119-
This fetches the full dataset from [Hugging Face](https://huggingface.co/datasets/OpenDriveLab-org/Kai0) into `./data` (FlattenFold, HangCloth, TeeShirtSort). To download only specific tasks or use a custom path, see the [dataset docs](docs/dataset.md#step-1-download-the-dataset).
119+
This fetches the full dataset from [Hugging Face](https://huggingface.co/datasets/OpenDriveLab-org/Kai0) into `./data` (Task_A, Task_B, Task_C). To download only specific tasks or use a custom path, see the [dataset docs](docs/dataset.md#step-1-download-the-dataset).
120120

121121
### 2. Download checkpoints (optional, for testing)
122122

123-
We provide **one best model per task** (FlattenFold, HangCloth, TeeShirtSort) in the [Kai0 repo on Hugging Face](https://huggingface.co/OpenDriveLab-org/Kai0/tree/main).
123+
We provide **one best model per task** (Task_A, Task_B, Task_C) in the [Kai0 repo on Hugging Face](https://huggingface.co/OpenDriveLab-org/Kai0/tree/main).
124124

125125
From the repository root, you can download all best-model checkpoints to `./checkpoints` with:
126126

@@ -131,7 +131,7 @@ python scripts/download_checkpoints.py
131131
To download only specific tasks or use a custom path, run:
132132

133133
```bash
134-
python scripts/download_checkpoints.py --tasks FlattenFold HangCloth --local-dir ./my_checkpoints
134+
python scripts/download_checkpoints.py --tasks Task_A Task_C --local-dir ./my_checkpoints
135135
```
136136

137137
After download, set `weight_loader` in the training config to the path of the corresponding checkpoint directory (see step 3 below). You can also use openpi’s pretrained π₀.5 checkpoint instead.
@@ -144,7 +144,7 @@ After the dataset is in `./data`, you can run **normal π₀.₅ full fine-tunin
144144

145145
Edit [`src/openpi/training/config.py`](src/openpi/training/config.py) (around lines 1173–1226) for the task(s) you need:
146146

147-
- **`repo_id`**: set to the **absolute path** to the dataset subset, e.g. `<path_to_repo_root>/data/FlattenFold/base`, `<path_to_repo_root>/data/TeeShirtSort/base`, or `<path_to_repo_root>/data/HangCloth/base`.
147+
- **`repo_id`**: set to the **absolute path** to the dataset subset, e.g. `<path_to_repo_root>/data/Task_A/base`, `<path_to_repo_root>/data/Task_B/base`, or `<path_to_repo_root>/data/Task_C/base`.
148148
- **`weight_loader`**: set to the path of your **π₀.₅ base checkpoint** — either the best model you downloaded in step 2 above, or openpi’s pretrained π₀.₅ checkpoint.
149149

150150
Config names to use: e.g. `pi05_flatten_fold_normal`
@@ -300,7 +300,7 @@ For a ready-to-use script with environment setup (conda/venv activation, DDP con
300300
**Stage 2 — Advantage Estimation on New Data**: Use the trained estimator to label datasets with predicted advantage values.
301301

302302
```bash
303-
uv run python stage_advantage/annotation/eval.py Flatten-Fold KAI0 /path/to/dataset
303+
uv run python stage_advantage/annotation/eval.py Task-A KAI0 /path/to/dataset
304304
```
305305

306306
For a ready-to-use script with environment setup and status logging, see `stage_advantage/annotation/eval.sh`.

setup/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ Quick reference for deploying and debugging hardware for the supported task plat
66

77
## Table of Contents
88

9-
- [1. FlattenFold / TeeShirtSort (Agilex Piper)](#1-flattenfold--teeshirtsort-agilex-piper)
10-
- [2. HangCloth (ARX X5)](#2-hangcloth-arx-x5)
9+
- [1. Task_A / Task_B (Agilex Piper)](#1-task_a--task_b-agilex-piper)
10+
- [2. Task_C (ARX X5)](#2-task_c-arx-x5)
1111
- [3. Inference Host](#3-inference-host)
1212

1313
---
1414

15-
## 1. FlattenFold / TeeShirtSort (Agilex Piper)
15+
## 1. Task_A / Task_B (Agilex Piper)
1616

17-
**Directories:** `FlattenFold/`, `TeeShirtSort/`
17+
**Directories:** `Task_A/`, `Task_B/`
1818

1919
### 1.1 Components
2020

@@ -24,7 +24,7 @@ Quick reference for deploying and debugging hardware for the supported task plat
2424
| Cameras | Intel RealSense D435 (triple-camera setup) |
2525
| Printed parts | Left/right wrist camera mounts, center camera mount, center camera base |
2626

27-
### 1.2 FlattenFold Layout
27+
### 1.2 Task_A Layout
2828

2929
| Parameter | Value |
3030
|-----------|-------|
@@ -37,7 +37,7 @@ Quick reference for deploying and debugging hardware for the supported task plat
3737
| Right primary arm → table front edge | 12 cm |
3838
| Left–right primary arm center distance | 39 cm |
3939

40-
### 1.3 TeeShirtSort Layout (demoA-style)
40+
### 1.3 Task_B Layout (demoA-style)
4141

4242
| Parameter | Value |
4343
|-----------|-------|
@@ -50,7 +50,7 @@ Quick reference for deploying and debugging hardware for the supported task plat
5050
| Right primary arm → table front edge | 11 cm |
5151
| Left–right primary arm center distance | 40 cm |
5252

53-
### 1.4 3D Models — Usage (FlattenFold / TeeShirtSort)
53+
### 1.4 3D Models — Usage (Task_A / Task_B)
5454

5555
#### Gripper (end-effector)
5656

@@ -77,9 +77,9 @@ Quick reference for deploying and debugging hardware for the supported task plat
7777

7878
---
7979

80-
## 2. HangCloth (ARX X5)
80+
## 2. Task_C (ARX X5)
8181

82-
**Directory:** `HangCloth/`
82+
**Directory:** `Task_C/`
8383

8484
### 2.1 Components
8585

@@ -102,7 +102,7 @@ Quick reference for deploying and debugging hardware for the supported task plat
102102
| Right primary arm → table front edge | 11 cm |
103103
| Left–right primary arm center distance | 53 cm |
104104

105-
### 2.3 3D Models — Usage (HangCloth)
105+
### 2.3 3D Models — Usage (Task_C)
106106

107107
#### Grippers (secondary arms)
108108

stage_advantage/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -235,18 +235,18 @@ Examples:
235235

236236
```bash
237237
# KAI0 (two-timestep) on a dataset
238-
uv run python stage_advantage/annotation/eval.py Flatten-Fold KAI0 /path/to/dataset
238+
uv run python stage_advantage/annotation/eval.py Task-A KAI0 /path/to/dataset
239239

240240
# PI06 (single-timestep)
241-
uv run python stage_advantage/annotation/eval.py Flatten-Fold PI06 /path/to/dataset
241+
uv run python stage_advantage/annotation/eval.py Task-A PI06 /path/to/dataset
242242
```
243243

244-
`<model_type>` is a key in `eval.py`'s `MODELS_CONFIG_MAP` (e.g. `Flatten-Fold`); `<model_name>` is `PI06` or `KAI0`; `<repo_id>` is the path to the LeRobot dataset. Results are written under `<repo_id>/data_<model_name>_<ckpt_steps>/`.
244+
`<model_type>` is a key in `eval.py`'s `MODELS_CONFIG_MAP` (e.g. `Task-A`); `<model_name>` is `PI06` or `KAI0`; `<repo_id>` is the path to the LeRobot dataset. Results are written under `<repo_id>/data_<model_name>_<ckpt_steps>/`.
245245

246246
For a ready-to-use script with environment setup (conda/venv activation, environment variables) and status logging, see **`annotation/eval.sh`**:
247247

248248
```bash
249-
bash stage_advantage/annotation/eval.sh Flatten-Fold KAI0 /path/to/dataset
249+
bash stage_advantage/annotation/eval.sh Task-A KAI0 /path/to/dataset
250250
```
251251

252252
### Evaluation Outputs
@@ -274,13 +274,13 @@ The output parquets can then be used in Stage 3 (AWBC) or fed back into Stage 0
274274

275275
**Goal**: Train a policy using **Advantage-Weighted Behavior Cloning (AWBC)**. The advantage labels (from Stage 0 + Stage 2) are stored as `task_index` per frame and as prompt strings in `meta/tasks.jsonl`. By setting **`prompt_from_task=True`** in the data config, each sample’s prompt is taken from that mapping, so the policy is conditioned on the advantage-derived label (e.g. high vs low advantage) and effectively does advantage-weighted behavior cloning via the language channel.
276276

277-
**Configs** (in `src/openpi/training/config.py`): `pi05_flatten_fold_awbc`, `pi05_tee_shirt_sort_awbc`, `pi05_hang_cloth_awbc`. Each uses `LerobotAgilexDataConfig` or `LerobotARXDataConfig` with `base_config=DataConfig(prompt_from_task=True)` and `repo_id` pointing to the **advantage** dataset (e.g. `.../data/FlattenFold/advantage`).
277+
**Configs** (in `src/openpi/training/config.py`): `pi05_flatten_fold_awbc`, `pi05_tee_shirt_sort_awbc`, `pi05_hang_cloth_awbc`. Each uses `LerobotAgilexDataConfig` or `LerobotARXDataConfig` with `base_config=DataConfig(prompt_from_task=True)` and `repo_id` pointing to the **advantage** dataset (e.g. `.../data/Task_A/advantage`).
278278

279279
### What the policy sees as prompt (training)
280280

281281
The prompt is read from the dataset’s **`meta/tasks.jsonl`**: each frame’s `task_index` is mapped to a task string, and that string is passed to the policy as the language prompt. **`gt_label.py`** (Stage 0) writes these strings when it builds the advantage-labeled dataset.
282282

283-
- **Binary mode** (typical): `task_index=0``"<task>, Advantage: negative"`, `task_index=1``"<task>, Advantage: positive"`. The `<task>` text is set in `gt_label.py` (e.g. `"fold the cloth"` for FlattenFold).
283+
- **Binary mode** (typical): `task_index=0``"<task>, Advantage: negative"`, `task_index=1``"<task>, Advantage: positive"`. The `<task>` text is set in `gt_label.py` (e.g. `"fold the cloth"` for Task_A).
284284
- **n_slices mode**: `task_index=i``"<task>, Advantage: {i}"`.
285285

286286
So during AWBC training the model is conditioned on prompts that explicitly include the advantage label (e.g. `"fold the cloth, Advantage: positive"` or `"fold the cloth, Advantage: negative"`).
@@ -299,7 +299,7 @@ At **inference** time you must use the **same prompt format** as in training. To
299299

300300
### Before training
301301

302-
1. **Produce the advantage dataset:** Run Stage 2 (eval) on your dataset so it has `data_PI06_100000/` or `data_KAI0_100000/`. Then run Stage 0 (e.g. `gt_labeling.sh`) with `DATA_PATH` = that repo and source subdirs `data_PI06_100000` / `data_KAI0_100000`; the script outputs a directory with `data/` (parquets with `task_index`), `meta/tasks.jsonl`, and `videos`. Use that directory as the advantage dataset (e.g. copy or link it to `./data/FlattenFold/advantage`).
302+
1. **Produce the advantage dataset:** Run Stage 2 (eval) on your dataset so it has `data_PI06_100000/` or `data_KAI0_100000/`. Then run Stage 0 (e.g. `gt_labeling.sh`) with `DATA_PATH` = that repo and source subdirs `data_PI06_100000` / `data_KAI0_100000`; the script outputs a directory with `data/` (parquets with `task_index`), `meta/tasks.jsonl`, and `videos`. Use that directory as the advantage dataset (e.g. copy or link it to `./data/Task_A/advantage`).
303303
2. In `config.py`, set **`repo_id`** to that advantage dataset path and **`weight_loader`** to your π₀.5 base checkpoint for the AWBC config(s) you use.
304304
3. **Compute norm stats:**
305305
`uv run python scripts/compute_norm_states_fast.py --config-name pi05_flatten_fold_awbc`

stage_advantage/annotation/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ uv run python scripts/train_pytorch.py ADVANTAGE_TORCH_KAI0_FLATTEN_FOLD --exp_n
1616

1717
# Step 3: Evaluate the trained estimator on new data (PI06 or KAI0)
1818
# From repo root:
19-
uv run python stage_advantage/annotation/eval.py Flatten-Fold KAI0 /path/to/dataset
19+
uv run python stage_advantage/annotation/eval.py Task-A KAI0 /path/to/dataset
2020

2121
# Step 4: Use the advantage-labeled data for AWBC (Stage 3)
2222
# After Stage 2, run gt_labeling.sh with DATA_PATH = eval repo (or gt_label.py --advantage-source absolute_advantage).

stage_advantage/awbc/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ All three are defined in `src/openpi/training/config.py`:
88

99
| Config name | Task | Data config |
1010
|-------------|------|-------------|
11-
| `pi05_flatten_fold_awbc` | FlattenFold | `LerobotAgilexDataConfig`, `repo_id=.../data/FlattenFold/advantage` |
12-
| `pi05_tee_shirt_sort_awbc` | TeeShirtSort | `LerobotAgilexDataConfig`, `repo_id=.../data/TeeShirtSort/advantage` |
13-
| `pi05_hang_cloth_awbc` | HangCloth | `LerobotARXDataConfig`, `repo_id=.../data/HangCloth/advantage` |
11+
| `pi05_flatten_fold_awbc` | Task_A | `LerobotAgilexDataConfig`, `repo_id=.../data/Task_A/advantage` |
12+
| `pi05_tee_shirt_sort_awbc` | Task_B | `LerobotAgilexDataConfig`, `repo_id=.../data/Task_B/advantage` |
13+
| `pi05_hang_cloth_awbc` | Task_C | `LerobotARXDataConfig`, `repo_id=.../data/Task_C/advantage` |
1414

1515
Each uses `base_config=DataConfig(prompt_from_task=True)` so that the dataset’s `task_index` column and `meta/tasks.jsonl` supply the prompt (advantage-derived label) per frame.
1616

@@ -24,11 +24,11 @@ Each uses `base_config=DataConfig(prompt_from_task=True)` so that the dataset’
2424
To build your own advantage dataset instead:
2525
- Run **Stage 2** (eval) on your dataset → get `data_PI06_100000/` or `data_KAI0_100000/` with advantage columns.
2626
- Run **Stage 0** on that output: `gt_label.py --advantage-source absolute_advantage` (or `gt_labeling.sh` with `DATA_PATH` = the eval repo). The resulting directory (with `data/`, `meta/tasks.jsonl`, `videos/`) is your advantage dataset.
27-
- Place or link it at e.g. `./data/FlattenFold/advantage` and set `repo_id` in config to that path.
27+
- Place or link it at e.g. `./data/Task_A/advantage` and set `repo_id` in config to that path.
2828

2929
2. **Config paths**
3030
In `src/openpi/training/config.py`, for the AWBC config(s) you use:
31-
- Set **`repo_id`** to the **absolute path** of the advantage dataset (e.g. `<path_to_repo_root>/data/FlattenFold/advantage`).
31+
- Set **`repo_id`** to the **absolute path** of the advantage dataset (e.g. `<path_to_repo_root>/data/Task_A/advantage`).
3232
- Set **`weight_loader`** to your **π₀.5 base checkpoint** path.
3333

3434
3. **Norm stats**

0 commit comments

Comments
 (0)