Skip to content

Latest commit

 

History

History
82 lines (64 loc) · 2.4 KB

training.md

File metadata and controls

82 lines (64 loc) · 2.4 KB

Training

The offline trainer consumes the dyed zarr dataset and writes configs, logs, and checkpoints below outputs/.

Smoke test

From the public repository root:

uv sync --locked
uv run python PredActor/scripts/training_smoke.py

The smoke test creates a deterministic zarr fixture, runs one optimization step through the PredActor state-action model, and checks the checkpoint.

Train on the 152-motion dataset

After collection and data dyeing:

uv run python PredActor/train.py \
  --cfg g1prdp_cond_diffuse.yaml \
  --exp_name predactor_bc \
  dataset_dir="$PWD/Artifacts/dataset/g1_152fk" \
  dataset.zarr_path=motion_dyed_text_t0.01.zarr \
  training.num_epochs=50 \
  training.seed=42 \
  dataloader.num_workers=16 \
  logging.mode=offline

This is the conditioned paper-profile run. For the condition-free PRDP baseline, use the same dataset directory and a separate output name:

uv run python PredActor/train.py \
  --cfg g1prdp_diffuse.yaml \
  --exp_name predactor_bc_unconditional \
  dataset_dir="$PWD/Artifacts/dataset/g1_152fk" \
  dataset.zarr_path=motion_dyed_text_t0.01.zarr \
  training.seed=42 \
  dataloader.num_workers=16 \
  logging.mode=offline

The unconditional config uses the same collected/dyed zarr layout but does not condition the policy on text. Keep the two output directories separate so their resolved configs and checkpoints remain unambiguous.

Use training.device=cpu for CPU training or --gpu N to select a CUDA device. The supported dataset fields and G1 ordering are implemented in PredActor/diffusion_policy/dataset/g1_dataset.py.

Evaluate the trained checkpoint

Training prints the run directory under outputs/. Set run_dir to that directory and launch the Web UI from the repository root:

run_dir="outputs/<run-directory>"
uv run --locked predactor-eval \
  --checkpoint "$run_dir/checkpoints/latest.ckpt" \
  --config "$run_dir/resolved_config.yaml" \
  --output_dir "$run_dir/eval" \
  --web-ui

Open http://127.0.0.1:8765/ and enter a motion command. The same command works for the condition-free model, but text commands do not affect that model. Add --web-perturb to enable mouse perturbations, or --web-port 8766 if port 8765 is already in use.

The full reproduction flow is:

152 retargeted motions + RLTracker teacher
  -> raw zarr collection
  -> MotionCLIP dyeing
  -> PredActor behavior-cloning training