dppo/cfg/furniture/finetune/lamp_low/ft_ppo_diffusion_unet.yaml
Allen Z. Ren dc8e0c9edc
v0.6 (#18)
* 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>
2024-10-30 19:58:06 -04:00

121 lines
3.1 KiB
YAML

defaults:
- _self_
hydra:
run:
dir: ${logdir}
_target_: agent.finetune.train_ppo_diffusion_agent.TrainPPODiffusionAgent
name: ${env_name}_ft_diffusion_unet_ta${horizon_steps}_td${denoising_steps}_tdf${ft_denoising_steps}
logdir: ${oc.env:DPPO_LOG_DIR}/furniture-finetune/${name}/${now:%Y-%m-%d}_${now:%H-%M-%S}_${seed}
base_policy_path: ${oc.env:DPPO_LOG_DIR}/furniture-pretrain/lamp/lamp_low_dim_pre_diffusion_unet_ta16_td100/2024-07-04_02-16-48/checkpoint/state_8000.pt
normalization_path: ${oc.env:DPPO_DATA_DIR}/furniture/${env.specific.furniture}_${env.specific.randomness}/normalization.pth
seed: 42
device: cuda:0
env_name: ${env.specific.furniture}_${env.specific.randomness}_dim
obs_dim: 44
action_dim: 10
denoising_steps: 100
ft_denoising_steps: 5
cond_steps: 1
horizon_steps: 16
act_steps: 8
use_ddim: True
env:
n_envs: 1000
name: ${env_name}
env_type: furniture
max_episode_steps: 1000
best_reward_threshold_for_success: 2
specific:
headless: true
furniture: lamp
randomness: low
normalization_path: ${normalization_path}
obs_steps: ${cond_steps}
act_steps: ${act_steps}
sparse_reward: True
wandb:
entity: ${oc.env:DPPO_WANDB_ENTITY}
project: furniture-${env.specific.furniture}-${env.specific.randomness}-finetune
run: ${now:%H-%M-%S}_${name}
train:
n_train_itr: 1000
n_critic_warmup_itr: 1
n_steps: ${eval:'round(${env.max_episode_steps} / ${act_steps})'}
gamma: 0.999
actor_lr: 1e-5
actor_weight_decay: 0
actor_lr_scheduler:
first_cycle_steps: 10000
warmup_steps: 10
min_lr: 1e-6
critic_lr: 1e-3
critic_weight_decay: 0
critic_lr_scheduler:
first_cycle_steps: 10000
warmup_steps: 10
min_lr: 1e-3
save_model_freq: 50
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: 40000
update_epochs: 5
vf_coef: 0.5
target_kl: 1
model:
_target_: model.diffusion.diffusion_ppo.PPODiffusion
# HP to tune
gamma_denoising: 0.9
clip_ploss_coef: 0.001
clip_ploss_coef_base: 0.001
clip_ploss_coef_rate: 3
randn_clip_value: 3
min_sampling_denoising_std: 0.04
#
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.unet.Unet1D
diffusion_step_embed_dim: 16
dim: 64
dim_mults: [1, 2, 4]
kernel_size: 5
n_groups: 8
smaller_encoder: False
cond_predict_scale: True
groupnorm_eps: 1e-4
cond_dim: ${eval:'${obs_dim} * ${cond_steps}'}
action_dim: ${action_dim}
critic:
_target_: model.common.critic.CriticObs
cond_dim: ${eval:'${obs_dim} * ${cond_steps}'}
mlp_dims: [512, 512, 512]
activation_type: Mish
residual_style: True
ft_denoising_steps: ${ft_denoising_steps}
horizon_steps: ${horizon_steps}
obs_dim: ${obs_dim}
action_dim: ${action_dim}
denoising_steps: ${denoising_steps}
device: ${device}