forked from real-stanford/diffusion_policy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
classifier_training.yaml
243 lines (241 loc) · 5.33 KB
/
classifier_training.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
hydra:
run:
dir: 'results_classifier/${now:%Y.%m.%d}/${now:%H.%M.%S}_${name}_${task_name}'
_target_: diffusion_policy.workspace.train_diffusion_unet_hybrid_workspace.TrainClassifierWorkspace
action_dim: 7
checkpoint:
save_last_ckpt: true
save_last_snapshot: false
topk:
format_str: epoch={epoch:04d}-mse_error_val={mse_error_val:.3f}.ckpt
k: 5
mode: min
monitor_key: mse_error_val
ema:
_target_: diffusion_policy.model.diffusion.ema_model.EMAModel
inv_gamma: 1.0
max_value: 0.9999
min_value: 0.0
power: 0.75
update_after_step: 0
critic_target:
_target_: diffusion_policy.model.diffusion.ema_model.EMAModel
inv_gamma: 1.0
max_value: 0.9999
min_value: 0.0
power: 0.75
update_after_step: 0
exp_name: obs_global_rerun
horizon: 16
keypoint_dim: 3
keypoint_visible_rate: 1.0
logging:
group: null
id: null
mode: online
name: 2023.02.25-03.06.09_train_diffusion_unet_image_franka
project: diffusion_policy_debug
resume: true
tags:
- train_diffusion_unet_image
- obs_global_rerun
multi_run:
run_dir: data/outputs/2023.02.25/03.06.09_train_diffusion_unet_image_franka_real
wandb_name_base: 2023.02.25-03.06.09_train_diffusion_unet_image_franka_real
n_action_steps: 8
n_latency_steps: 0
n_obs_steps: 4
name: train_diffusion_unet_image_franka
obs_as_global_cond: true
obs_as_local_cond: false
optimizer:
_target_: torch.optim.AdamW
betas:
- 0.95
- 0.999
eps: 1.0e-08
lr: 0.0001
weight_decay: 1.0e-06
critic_optimizer:
_target_: torch.optim.AdamW
betas:
- 0.95
- 0.999
eps: 1.0e-08
lr: 0.0001
weight_decay: 1.0e-06
past_action_visible: false
eps_lagrange_constraint_mse_predictions: 0.00025
lagrange_optimizer:
_target_: torch.optim.AdamW
betas:
- 0.95
- 0.999
eps: 1.0e-08
lr: 0.001
weight_decay: 1.0e-06
policy:
_target_: diffusion_policy.policy.diffusion_unet_hybrid_image_policy.DiffusionUnetHybridImagePolicy
eta_coeff_critic: 0.001
cond_predict_scale: true
crop_shape: [216, 216]
diffusion_step_embed_dim: 128
down_dims:
- 512
- 1024
- 2048
eval_fixed_crop: true
horizon: 16
kernel_size: 5
n_action_steps: 8
n_obs_steps: 4
n_groups: 8
shape_meta:
action:
shape:
- 7
obs:
camera_1:
shape:
# - 4 # TODO
- 3
- 120
- 240
type: rgb
eef:
shape:
- 7
type: low_dim
mass:
shape:
- 256 # after RFF
type: low_dim
noise_scheduler:
_target_: diffusers.schedulers.scheduling_ddim.DDIMScheduler
num_train_timesteps: 100
beta_start: 0.0001
beta_end: 0.02
# beta_schedule is important
# this is the best we found
beta_schedule: squaredcos_cap_v2
clip_sample: True
set_alpha_to_one: True
steps_offset: 0
prediction_type: epsilon # or sample
num_inference_steps: 10
obs_as_global_cond: true
obs_encoder_group_norm: true
critic:
_target_: diffusion_policy.model.diffusion.conditional_unet1d_critic.DoubleCritic
n_action_steps: 8
horizon: 16
cond_predict_scale: true
diffusion_step_embed_dim: 128
down_dims:
- 512
- 1024
- 2048
kernel_size: 5
n_obs_steps: 4
n_groups: 8
shape_meta:
action:
shape:
- 7
obs:
camera_1:
shape:
# - 4 # TODO
- 3
- 120
- 240
type: rgb
eef:
shape:
- 7
type: low_dim
mass:
shape:
- 256 # after RFF
type: low_dim
obs_as_global_cond: true
gamma: 0.99
pred_action_steps_only: false
task:
abs_action: true
dataset:
_target_: diffusion_policy.dataset.real_franka_image_dataset.RealFrankaImageDataset
augment_data: true
# abs_action: true
shape_meta:
action:
shape:
- 7
obs:
camera_1: # TODO: change back to camera_0
shape:
# - 4 # TODO
- 3
- 120
- 240
type: rgb
mass:
shape:
- 256 # after RFF
type: low_dim
eef:
shape:
- 7
type: low_dim
label:
shape:
- 1
type: low_dim
dataset_path: /home/lucagrillotti/ros/humble/src/project_shokunin/shokunin_common/rl/scooping_agent/puree_agent/dataset_parameterized_motion/ # TODO
dt: 0.1
horizon: 16
n_obs_steps: 4
n_action_steps: 8
pad_after: 7
pad_before: 1
# robot_noise_ratio: 0.1
seed: 42
val_ratio: 0.02
delta_action: false
use_cache: true
mass_encoding_size: 256
period_adjustment_rff: 0.15
proba_diffusion_remove_mass_label: 0.2
env_runner:
_target_: diffusion_policy.env_runner.real_robot_runner.DummyImageRobot
task_name: kitchen_lowdim
training:
path_classifier_state_dict: null # TODO
checkpoint_every: 1 # Needs to be a multiple of sample_every
debug: false
device: cuda:0
gradient_accumulate_every: 1
lr_scheduler: cosine
lr_warmup_steps: 500
max_train_steps: null
max_val_steps: null
num_epochs: 25
resume: true
rollout_every: 50
sample_every: 1
seed: 42
tqdm_interval_sec: 1.0
use_ema: true
val_every: 1
val_dataloader:
batch_size: 16
num_workers: 8
persistent_workers: false
pin_memory: true
shuffle: false
dataloader:
batch_size: 32
num_workers: 30
persistent_workers: false
pin_memory: true
shuffle: true