Chand0320's picture
Add three-task run code and logs
819919b verified
|
Raw History Blame Contribute Delete
3.56 kB

Three-task source encoder run

This is a new experiment, separate from the completed seven-task representation run and Coffee-only retrieval pool.

Data roles

  • D_source and D_repr: 100 deterministic seed-0 demonstrations each from core/coffee_preparation_d0, core/pick_place_d0, and core/kitchen_d0. Every complete ten-step window from these manifests is eligible for retrieval. The fixed manifests contain 67,762, 66,711, and 60,857 windows respectively, for 195,330 source candidates total.
  • Downstream query sets: 25 deterministic seed-0 demonstrations each from Mug Cleanup O1 and Hammer Cleanup D0. Coffee D0 can serve as a direct-overlap positive control. None enters encoder training, source density estimation, or normalization. Target manifests and RLDS are built separately by scripts/build_multi_source_targets.sh. They contain 8,325 Mug windows and 6,841 Hammer windows.
  • The source KDE for IWR must be refitted on the combined eligible source embeddings. The Coffee-only saved KDE is not valid for this pool.

Encoder

configs/mimicgen_vae_sailor_multi_source.py retains the prior 16-dimensional SAILOR VAE and ten-action chunks. It samples the three tasks equally, uses batch 128 and seed 1, and runs for a predetermined 70,000 updates. Loader caching is off to stay within instance memory. The smoke run is ten updates. The target tasks do not determine the checkpoint. The 197,730 training anchors and 8.96 million sampled examples imply about 45.3 presentations per anchor on average, close to the prior broad run's compute-matching target.

Pipeline

After the three raw HDF5 files are in data/raw/mimicgen_corl_2023/core/ and envs/train plus the IWR adapter are installed, run from the project root:

bash scripts/run_multi_source_pipeline.sh

The pipeline creates fixed manifests in data/manifests/multi_source_3task/, builds and verifies RLDS, runs a ten-update smoke test, trains the main encoder, then writes per-task and combined .npz arrays to artifacts/retrieval/multi_source_3task/embeddings/. The combined array includes embeddings, (episode, start timestep) ids, and task_ids to disambiguate the three source datasets. Embeddings use the frozen checkpoint and its saved normalization statistics.

After target RLDS preparation and the 70k checkpoint are complete, run scripts/extract_multi_source_target_embeddings.py to write Mug O1 and Hammer D0 query arrays using the frozen source-pool normalization statistics.

scripts/run_multi_source_scoring_when_ready.sh waits for both extraction jobs. It then ranks all eligible source windows for each target using BR (nearest Euclidean target embedding) and global IWR (log p_target(z) - log p_source(z)). The source KDE uses all 195,330 eligible windows, with bandwidth multiplier 8 and covariance regularization 1e-4. Selections include overlap, nonoverlap, and matched random controls. Every selected clip retains its source task, episode, and start timestep. The budgets are 855 ten-step clips for Mug O1 and 707 for Hammer D0.

scripts/upload_multi_source_when_ready.sh waits for scoring success, then uploads the encoder checkpoints and training state, source and target embeddings, source KDE, rankings and selections, manifests, exact code snapshot, environment freeze, checksums, and logs to Chand0320/single-task-transfer-artifacts. The raw MimicGen HDF5 and generated RLDS remain in their original repositories or on the instance and are not duplicated in the artifact dataset.