Upload sim_finetune/v2dit_sim_finetune_v2_5task_aligned/region_ablation/link17/ckpt/config_resolved.yaml with huggingface_hub
Browse files
sim_finetune/v2dit_sim_finetune_v2_5task_aligned/region_ablation/link17/ckpt/config_resolved.yaml
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
_base_: base.yaml
|
| 2 |
+
|
| 3 |
+
# CORRESPONDENCE ABLATION -- "native 17-link output head" row (2026-11-22). Identical to v2_wilor_feat_dit_sim_finetune_v2.yaml
|
| 4 |
+
# (same human-pretrained init, data, schedule, seed) except the tactile head: the GridDiT over the 21x21 canonical grid is
|
| 5 |
+
# replaced by a CellDiT with ONE token per Shadow-hand link (17), predicting the normalized link net force directly (target
|
| 6 |
+
# cache built by scripts/tools/sim_ft_region_targets.py build --gran link17). The DiT blocks / timestep / cond projection
|
| 7 |
+
# still load from the human checkpoint (same names and shapes); only x_embed / pos_proj / head are new. Train with
|
| 8 |
+
# scripts/sim_ft_train.sbatch CONFIG=this; eval with --gt_cache <native clips> --link_p99 <cache>/link17_p99.json --pred_link_native.
|
| 9 |
+
#
|
| 10 |
+
# v2 RE-RUN (2026-10): v2-dit finetuned on the 5-task, task-balanced sim set (bidexhands Pen + Scissors, VTDexManip handover +
|
| 11 |
+
# slide + bottle_cap; ~2000 clip windows/task, corrected pressure<->frame alignment), warm-started from the real-EgoTouch
|
| 12 |
+
# v2_wilor_feat_dit checkpoint. Differences vs v2_wilor_feat_dit_sim_finetune.yaml (the original 5-task run) -- ONLY the
|
| 13 |
+
# schedule, because the set is ~2-3x smaller: ema_decay 0.9999 -> 0.999 (at ~60 steps/epoch an EMA of 0.9999 would still be
|
| 14 |
+
# 73% initial weights after 50 epochs) and num_epochs 50 -> 100.
|
| 15 |
+
#
|
| 16 |
+
# (original header follows) v2-dit finetuned on sim robot trajectory data (DexterousHands: Scissors/Handover/DoorOpenOutward/
|
| 17 |
+
# Hora/Pen), warm-started from the real-EgoTouch v2_wilor_feat_dit checkpoint.
|
| 18 |
+
#
|
| 19 |
+
# ================================================================================================
|
| 20 |
+
# WHAT'S THE SAME AS configs/v2_wilor_feat_dit.yaml, AND WHAT'S DIFFERENT
|
| 21 |
+
# ================================================================================================
|
| 22 |
+
# SAME (verbatim, byte-for-byte copy of the `model:` block below -- a warm-start finetune must
|
| 23 |
+
# not change architecture, or the loaded checkpoint's weights won't line up):
|
| 24 |
+
# - Every model sub-block: wilor_backbone, vision_encoder, temporal_transformer, pose_encoder,
|
| 25 |
+
# fusion, tactile_decoder, tactile_head (type: "dit" -- native 21x21 grid, no 778/MANO space,
|
| 26 |
+
# already true for this head type), objective (flow_matching + same loss weights).
|
| 27 |
+
#
|
| 28 |
+
# DIFFERENT:
|
| 29 |
+
# | Aspect | v2_wilor_feat_dit.yaml (real data) | THIS config (sim robot data) |
|
| 30 |
+
# |---------------------|---------------------------------------|-----------------------------------|
|
| 31 |
+
# | Training script | scripts/core/train.py (ONLINE: raw | scripts/core/train_cached.py |
|
| 32 |
+
# | | HDF5 frames -> live SAM3/WiLoR/DINO) | (CACHED: pre-extracted DINO+ |
|
| 33 |
+
# | | | WiLoR features via dump_sim_cond)|
|
| 34 |
+
# | Data source | data.data_root (EgoTouch_hdf5_chest) | --cond_cache CLI arg (clip cache |
|
| 35 |
+
# | | + data.crop_root (SAM3 crops) | built by dump_sim_cond.py) |
|
| 36 |
+
# | Weight init | trained from scratch | --init_weights <real ckpt> |
|
| 37 |
+
# | | | (see Launch cmd below) |
|
| 38 |
+
# | Augmentation | glove_augmentation enabled=true | 30% of the TRAIN split (only, |
|
| 39 |
+
# | | prob=0.2 -- was a NO-OP until the | stratified across all 5 tasks) |
|
| 40 |
+
# | | reader/writer schema bug was fixed | gets the SAME GloveAugmentation |
|
| 41 |
+
# | | this session (src/data/ | class, driven by a SAM3-detected |
|
| 42 |
+
# | | touchanything_dataset.py) | ROBOT-hand mask instead of a |
|
| 43 |
+
# | | | human-glove mask (sim_cond_cache |
|
| 44 |
+
# | | | .py --glove_aug; merged in as an |
|
| 45 |
+
# | | | extra shard by dump_sim_cond.py, |
|
| 46 |
+
# | | | val is never touched) |
|
| 47 |
+
# | batch_size / lr | 9 (x16 GPU=144 global) / 1e-4 | 144 (9x16GPU, same) / 3e-5 (lower LR)|
|
| 48 |
+
# | | | finetune, not from-scratch) |
|
| 49 |
+
# | num_epochs | 50 | 50 (matches from-scratch epoch count) |
|
| 50 |
+
# | Pressure norm | per-SEQUENCE max, baked in upstream | per-EPISODE max (dump_sim_cond |
|
| 51 |
+
# | | before HDF5 build | .py) -- same convention, just |
|
| 52 |
+
# | | | computed at cache-build time |
|
| 53 |
+
# | wandb rgb|gt|pred viz | train.py's built-in viz | train_cached.py's NEW opt-in viz |
|
| 54 |
+
# | | | (loads raw frames via a |
|
| 55 |
+
# | | | frame_index.json sidecar sim |
|
| 56 |
+
# | | | data only) |
|
| 57 |
+
#
|
| 58 |
+
# Launch (see experiments/CHANGELOG.md for the exact commands used):
|
| 59 |
+
# python scripts/core/train_cached.py --config configs/v2_wilor_feat_dit_sim_finetune.yaml \
|
| 60 |
+
# --cond_cache /scratch/project/prj-02-uq-llms-for-reasoning/yqq/cond_cache_shards/sim_cond_cache_clips \
|
| 61 |
+
# --init_weights /scratch/project/prj-02-uq-llms-for-reasoning/yqq/Ego2Contact/checkpoints/20260807_033942_dinov2_vitb14_tactile_prediction_v2_wilor_feat_dit/checkpoint_epoch_50.pth \
|
| 62 |
+
# --out /scratch/project/prj-02-uq-llms-for-reasoning/yqq/Ego2Contact/checkpoints/v2_wilor_feat_dit_sim_finetune
|
| 63 |
+
|
| 64 |
+
model:
|
| 65 |
+
task: "tactile_prediction"
|
| 66 |
+
num_input_joints: 42
|
| 67 |
+
cond_source: "wilor_feat"
|
| 68 |
+
wilor_feat_dropout: 0.2
|
| 69 |
+
|
| 70 |
+
wilor_backbone: # declared for parity; cached training skips the online fwd
|
| 71 |
+
wilor_repo: "/scratch/project/prj-02-uq-llms-for-reasoning/yqq/WiLoR"
|
| 72 |
+
ckpt_path: "/scratch/project/prj-02-uq-llms-for-reasoning/yqq/WiLoR/pretrained_models/wilor_final.ckpt"
|
| 73 |
+
mean_params: "/scratch/project/prj-02-uq-llms-for-reasoning/yqq/WiLoR/mano_data/mano_mean_params.npz"
|
| 74 |
+
num_tokens_per_hand: 16
|
| 75 |
+
freeze: true
|
| 76 |
+
|
| 77 |
+
vision_encoder:
|
| 78 |
+
type: "dinov2"
|
| 79 |
+
model_name: "dinov2_vitb14"
|
| 80 |
+
pretrained_path: "models/dinov2/dinov2_vitb14_pretrain.pth"
|
| 81 |
+
freeze: true
|
| 82 |
+
patch_size: 14
|
| 83 |
+
embed_dim: 768
|
| 84 |
+
|
| 85 |
+
temporal_transformer:
|
| 86 |
+
num_layers: 3
|
| 87 |
+
num_heads: 8
|
| 88 |
+
hidden_dim: 768
|
| 89 |
+
mlp_ratio: 4.0
|
| 90 |
+
dropout: 0.1
|
| 91 |
+
window_size: 16
|
| 92 |
+
|
| 93 |
+
multi_view:
|
| 94 |
+
enabled: false
|
| 95 |
+
|
| 96 |
+
pose_encoder:
|
| 97 |
+
type: "wilor_feat"
|
| 98 |
+
feat_dim: 1280
|
| 99 |
+
num_tokens_per_hand: 16
|
| 100 |
+
num_layers: 2
|
| 101 |
+
num_heads: 8
|
| 102 |
+
mlp_ratio: 4.0
|
| 103 |
+
dropout: 0.1
|
| 104 |
+
|
| 105 |
+
fusion:
|
| 106 |
+
type: "cross_attention"
|
| 107 |
+
num_heads: 8
|
| 108 |
+
num_layers: 2
|
| 109 |
+
mlp_ratio: 4.0
|
| 110 |
+
dropout: 0.1
|
| 111 |
+
|
| 112 |
+
tactile_decoder:
|
| 113 |
+
type: "joint_level"
|
| 114 |
+
num_joints: 42
|
| 115 |
+
tactile_size: 21
|
| 116 |
+
|
| 117 |
+
tactile_head: # NATIVE 17-LINK OUTPUT (correspondence ablation): one CellDiT token per Shadow link, no grid
|
| 118 |
+
type: "cell_dit"
|
| 119 |
+
cells_path: "src/resources/flathand_links17.npz"
|
| 120 |
+
require_mesh_tv: false
|
| 121 |
+
|
| 122 |
+
depth: 6
|
| 123 |
+
num_heads: 8
|
| 124 |
+
mlp_ratio: 4.0
|
| 125 |
+
dropout: 0.0
|
| 126 |
+
cross: true
|
| 127 |
+
|
| 128 |
+
objective:
|
| 129 |
+
type: "flow_matching"
|
| 130 |
+
sample_steps: 8
|
| 131 |
+
sample_n: 1
|
| 132 |
+
mse_w: 1.0
|
| 133 |
+
l1_w: 0.5
|
| 134 |
+
tv_w: 0.01
|
| 135 |
+
contact_w: 3.0
|
| 136 |
+
contact_tau: 0.1
|
| 137 |
+
contact_sym: false
|
| 138 |
+
use_mask: false
|
| 139 |
+
|
| 140 |
+
data:
|
| 141 |
+
# NOTE: train_cached.py reads the clip cache via --cond_cache (CLI), not these data.* fields --
|
| 142 |
+
# they're kept for reference/consistency with the online configs, and clip_length/frame_interval/
|
| 143 |
+
# tactile_size MUST match what dump_sim_cond.py was run with (defaults: 8/2/21, same as v2_dit).
|
| 144 |
+
clip_length: 8
|
| 145 |
+
frame_interval: 2
|
| 146 |
+
tactile_size: 21
|
| 147 |
+
image_size: [224, 224]
|
| 148 |
+
normalize_mean: [0.485, 0.456, 0.406]
|
| 149 |
+
normalize_std: [0.229, 0.224, 0.225]
|
| 150 |
+
flip_left_crop: true
|
| 151 |
+
use_augmentation: false # sim data has no glove to augment; matches the established no-op finding
|
| 152 |
+
|
| 153 |
+
training:
|
| 154 |
+
batch_size: 144 # matches v2_dit global batch convention (9/gpu x 16 GPU)
|
| 155 |
+
num_workers: 2 # 2 CPU/GPU budget at 16-GPU scale (run_train_cached_ddp.sbatch)
|
| 156 |
+
num_epochs: 100 # v2 re-run: smaller set -> more epochs (original run: 50)
|
| 157 |
+
gradient_accumulation_steps: 1
|
| 158 |
+
invalid_pose_policy: "keep"
|
| 159 |
+
pose_valid_joint_ratio_threshold: 0.0
|
| 160 |
+
ema_decay: 0.999 # v2 re-run (original run: 0.9999), see header
|
| 161 |
+
optimizer: {type: "adamw", lr: 3.0e-5, weight_decay: 0.0, betas: [0.9, 0.999]} # lower LR than
|
| 162 |
+
# from-scratch (1e-4) since this is a warm-start finetune
|
| 163 |
+
scheduler: {type: "constant", warmup_epochs: 0, min_lr: 1.0e-6}
|
| 164 |
+
loss: {mse_weight: 1.0, l1_weight: 0.5, tv_weight: 0.01, contact_weight: 3.0, pressure_threshold: 0.1}
|
| 165 |
+
save_interval: 2
|
| 166 |
+
log_interval: 10
|
| 167 |
+
val_interval: 1
|
| 168 |
+
viz_interval: 2
|
| 169 |
+
val_sample_batches: 16
|
| 170 |
+
wandb: {enabled: true, project: "ego2contact", name: v2_wilor_feat_dit_sim_finetune_link17}
|
| 171 |
+
|
| 172 |
+
system:
|
| 173 |
+
seed: 42
|
| 174 |
+
gpu_ids: [0,1,2,3]
|
| 175 |
+
mixed_precision: false
|
| 176 |
+
cudnn_benchmark: true
|