* Sampling over both env and denoising steps in DPPO updates (#13) * sample one from each chain * full random sampling * Add Proficient Human (PH) Configs and Pipeline (#16) * fix missing cfg * add ph config * fix how terminated flags are added to buffer in ibrl * add ph config * offline calql for 1M gradient updates * bug fix: number of calql online gradient steps is the number of new transitions collected * add sample config for DPPO with ta=1 * Sampling over both env and denoising steps in DPPO updates (#13) * sample one from each chain * full random sampling * fix diffusion loss when predicting initial noise * fix dppo inds * fix typo * remove print statement --------- Co-authored-by: Justin M. Lidard <jlidard@neuronic.cs.princeton.edu> Co-authored-by: allenzren <allen.ren@princeton.edu> * update robomimic configs * better calql formulation * optimize calql and ibrl training * optimize data transfer in ppo agents * add kitchen configs * re-organize config folders, rerun calql and rlpd * add scratch gym locomotion configs * add kitchen installation dependencies * use truncated for termination in furniture env * update furniture and gym configs * update README and dependencies with kitchen * add url for new data and checkpoints * update demo RL configs * update batch sizes for furniture unet configs * raise error about dropout in residual mlp * fix observation bug in bc loss --------- Co-authored-by: Justin Lidard <60638575+jlidard@users.noreply.github.com> Co-authored-by: Justin M. Lidard <jlidard@neuronic.cs.princeton.edu>
170 lines
4.4 KiB
YAML
170 lines
4.4 KiB
YAML
defaults:
|
|
- _self_
|
|
hydra:
|
|
run:
|
|
dir: ${logdir}
|
|
_target_: agent.finetune.train_ppo_diffusion_img_agent.TrainPPOImgDiffusionAgent
|
|
|
|
name: ${env_name}_ft_diffusion_mlp_img_ta${horizon_steps}_td${denoising_steps}_tdf${ft_denoising_steps}
|
|
logdir: ${oc.env:DPPO_LOG_DIR}/robomimic-finetune/${name}/${now:%Y-%m-%d}_${now:%H-%M-%S}_${seed}
|
|
base_policy_path: ${oc.env:DPPO_LOG_DIR}/robomimic-pretrain/lift/lift_pre_diffusion_mlp_img_ta4_td100/2024-07-30_22-24-35/checkpoint/state_2500.pt
|
|
robomimic_env_cfg_path: cfg/robomimic/env_meta/${env_name}-img.json
|
|
normalization_path: ${oc.env:DPPO_DATA_DIR}/robomimic/${env_name}-img/normalization.npz
|
|
|
|
seed: 42
|
|
device: cuda:0
|
|
env_name: lift
|
|
obs_dim: 9
|
|
action_dim: 7
|
|
denoising_steps: 100
|
|
ft_denoising_steps: 5
|
|
cond_steps: 1
|
|
img_cond_steps: 1
|
|
horizon_steps: 4
|
|
act_steps: 4
|
|
use_ddim: True
|
|
|
|
env:
|
|
n_envs: 50
|
|
name: ${env_name}
|
|
best_reward_threshold_for_success: 1
|
|
max_episode_steps: 300
|
|
save_video: False
|
|
use_image_obs: True
|
|
wrappers:
|
|
robomimic_image:
|
|
normalization_path: ${normalization_path}
|
|
low_dim_keys: ['robot0_eef_pos',
|
|
'robot0_eef_quat',
|
|
'robot0_gripper_qpos']
|
|
image_keys: ['robot0_eye_in_hand_image']
|
|
shape_meta: ${shape_meta}
|
|
multi_step:
|
|
n_obs_steps: ${cond_steps}
|
|
n_action_steps: ${act_steps}
|
|
max_episode_steps: ${env.max_episode_steps}
|
|
reset_within_step: True
|
|
|
|
shape_meta:
|
|
obs:
|
|
rgb:
|
|
shape: [3, 96, 96]
|
|
state:
|
|
shape: [9]
|
|
action:
|
|
shape: [7]
|
|
|
|
wandb:
|
|
entity: ${oc.env:DPPO_WANDB_ENTITY}
|
|
project: robomimic-${env_name}-finetune
|
|
run: ${now:%H-%M-%S}_${name}
|
|
|
|
train:
|
|
n_train_itr: 151
|
|
n_critic_warmup_itr: 2
|
|
n_steps: 300
|
|
gamma: 0.999
|
|
augment: True
|
|
grad_accumulate: 15
|
|
actor_lr: 1e-4
|
|
actor_weight_decay: 0
|
|
actor_lr_scheduler:
|
|
first_cycle_steps: 1000
|
|
warmup_steps: 10
|
|
min_lr: 1e-4
|
|
critic_lr: 1e-3
|
|
critic_weight_decay: 0
|
|
critic_lr_scheduler:
|
|
first_cycle_steps: 1000
|
|
warmup_steps: 10
|
|
min_lr: 1e-3
|
|
save_model_freq: 100
|
|
val_freq: 10
|
|
render:
|
|
freq: 1
|
|
num: 0
|
|
# PPO specific
|
|
reward_scale_running: True
|
|
reward_scale_const: 1.0
|
|
gae_lambda: 0.95
|
|
batch_size: 500
|
|
logprob_batch_size: 500
|
|
update_epochs: 10
|
|
vf_coef: 0.5
|
|
target_kl: 1
|
|
|
|
model:
|
|
_target_: model.diffusion.diffusion_ppo.PPODiffusion
|
|
# HP to tune
|
|
gamma_denoising: 0.99
|
|
clip_ploss_coef: 0.01
|
|
clip_ploss_coef_base: 0.001
|
|
clip_ploss_coef_rate: 3
|
|
randn_clip_value: 3
|
|
min_sampling_denoising_std: 0.1
|
|
min_logprob_denoising_std: 0.1
|
|
#
|
|
use_ddim: ${use_ddim}
|
|
ddim_steps: ${ft_denoising_steps}
|
|
learn_eta: False
|
|
eta:
|
|
base_eta: 1
|
|
input_dim: ${obs_dim}
|
|
mlp_dims: [256, 256]
|
|
action_dim: ${action_dim}
|
|
min_eta: 0.1
|
|
max_eta: 1.0
|
|
_target_: model.diffusion.eta.EtaFixed
|
|
network_path: ${base_policy_path}
|
|
actor:
|
|
_target_: model.diffusion.mlp_diffusion.VisionDiffusionMLP
|
|
backbone:
|
|
_target_: model.common.vit.VitEncoder
|
|
obs_shape: ${shape_meta.obs.rgb.shape}
|
|
num_channel: ${eval:'3 * ${img_cond_steps}'} # each image patch is history concatenated
|
|
img_h: ${shape_meta.obs.rgb.shape[1]}
|
|
img_w: ${shape_meta.obs.rgb.shape[2]}
|
|
cfg:
|
|
patch_size: 8
|
|
depth: 1
|
|
embed_dim: 128
|
|
num_heads: 4
|
|
embed_style: embed2
|
|
embed_norm: 0
|
|
augment: False
|
|
spatial_emb: 128
|
|
time_dim: 32
|
|
mlp_dims: [512, 512, 512]
|
|
residual_style: True
|
|
img_cond_steps: ${img_cond_steps}
|
|
cond_dim: ${eval:'${obs_dim} * ${cond_steps}'}
|
|
horizon_steps: ${horizon_steps}
|
|
action_dim: ${action_dim}
|
|
critic:
|
|
_target_: model.common.critic.ViTCritic
|
|
spatial_emb: 128
|
|
augment: False
|
|
backbone:
|
|
_target_: model.common.vit.VitEncoder
|
|
obs_shape: ${shape_meta.obs.rgb.shape}
|
|
num_channel: ${eval:'3 * ${img_cond_steps}'} # each image patch is history concatenated
|
|
img_h: ${shape_meta.obs.rgb.shape[1]}
|
|
img_w: ${shape_meta.obs.rgb.shape[2]}
|
|
cfg:
|
|
patch_size: 8
|
|
depth: 1
|
|
embed_dim: 128
|
|
num_heads: 4
|
|
embed_style: embed2
|
|
embed_norm: 0
|
|
img_cond_steps: ${img_cond_steps}
|
|
mlp_dims: [256, 256, 256]
|
|
activation_type: Mish
|
|
residual_style: True
|
|
cond_dim: ${eval:'${obs_dim} * ${cond_steps}'}
|
|
ft_denoising_steps: ${ft_denoising_steps}
|
|
horizon_steps: ${horizon_steps}
|
|
obs_dim: ${obs_dim}
|
|
action_dim: ${action_dim}
|
|
denoising_steps: ${denoising_steps}
|
|
device: ${device} |