train_maniflow.py Reference#
Every flag of maniflow-tb’s scripts/train_maniflow.py at commit c04eab7, the commit the
maniflow-tb submodule is pinned to (python maniflow-tb/scripts/train_maniflow.py --help
prints the same list). For the workflow (setup, an example run, outputs, evaluation) see
Pre-training Policies on Automatically Generated Data.
The flags are spelled with underscores. Each one either sets a field of
examples/Franka/train_maniflow_multimodal.yaml on the train_hvla.py command line or
configures the launcher. With --resume, the architecture flags (marked “fresh runs
only”) are not emitted: the run’s saved config.yaml defines them.
Launcher and logging#
Flag |
Default |
Description |
|---|---|---|
|
off |
Print the run ID, run directory and training command, then exit without training. |
|
none |
Prefix of the run ID ( |
|
derived |
Run name; replaces the ID built from the flags (see Run name). Must be shorter than 123 characters. |
|
all visible GPUs |
GPUs per node ( |
|
|
Nodes. More than one launches with |
|
|
Rank of this node (multi-node only). |
|
|
Address of node 0 (multi-node only). |
|
|
Rendezvous port on node 0 (multi-node only). |
|
|
W&B project. |
|
|
W&B entity. |
|
see description |
|
The training command runs inside maniflow-tb/. --data_root_dir and --run_root_dir are
resolved against the directory you launch from, so relative paths work from anywhere.
Data#
All fresh runs only, except --num_workers.
Flag |
Default |
Description |
|---|---|---|
|
none |
One or more LeRobot datasets; several are co-trained, merged at load time. Required for a new run; a |
|
|
Dataset mixture name ( |
|
|
Fraction of episodes held out for validation. |
|
all |
Use only N episodes, then split them into validation and training. A comma-separated list (e.g. |
|
none |
Sampling ratio across datasets, e.g. |
|
|
Dataloader workers per process. |
|
none |
Episode filter preset name or YAML path; presets are in |
|
none |
Dotlist overrides of the filter config, e.g. |
|
off |
Drop episodes in which any joint moves more than RAD radians between consecutive frames (teleport resets). The bare flag uses 0.5. Applies to training and validation. |
|
off |
Drop episodes with a rotate cycle that turns the block less than DEG degrees about z (failed rotate attempts). The bare flag uses 10. Applies to training and validation. |
|
none |
Allow-list of |
|
none |
Sampling weights per |
|
none |
Comma-separated low-level actions to skip. |
|
off |
Drop redundant back-to-back table-to-table retries, keeping the last attempt. |
|
all |
Truncate each episode to its first N frames. |
|
none |
Skip the first N frames of every episode. |
Training loop and optimizer#
Flag |
Default |
Description |
|---|---|---|
|
|
Training steps ( |
|
|
Batch size per GPU. |
|
|
Gradient accumulation steps. |
|
|
|
|
|
Muon learning rate; lower it (e.g. 0.01 or 0.005) if training diverges. |
|
|
Save a checkpoint every N steps. |
|
|
Log metrics every N steps. |
|
|
Parent directory of the run directory ( |
|
none |
Run ID to resume from |
|
none |
Checkpoint whose weights initialize a new run at step 0; optimizer, scheduler, EMA and W&B state are not restored. |
Action and state#
All fresh runs only.
Flag |
Default |
Description |
|---|---|---|
|
|
Action space: |
|
none |
Custom action columns, e.g. |
|
|
Arm-action normalization band: |
|
off |
Predict |
|
|
Proprioceptive state size: joint positions (7), gripper and PD mode. |
|
off |
Add joint velocities (7) and the end-effector XYZ (3), giving a 19-D state. |
|
off |
Zero the state vector, keeping its size. |
|
off |
Add the 6-D wrench to the state. |
|
|
Predicted action chunk length. |
|
|
Actions executed per chunk. |
|
|
ODE solver steps at inference. |
Cameras and RGB#
All fresh runs only.
Flag |
Default |
Description |
|---|---|---|
|
front and gripper RGB |
Camera preset (table below). |
|
off |
Legacy: same as |
|
off |
Read pre-resized RGB videos from |
|
|
timm RGB backbone, e.g. |
|
off |
Shorthand for |
|
off |
Freeze the RGB backbone instead of fine-tuning it. |
|
off |
Add the previous front frame as a third RGB view. |
|
none |
Weighted lookback ranges of that frame, e.g. |
|
|
Target-centred square front crop: |
--camera_config presets:
Preset |
RGB |
Depth |
|---|---|---|
|
front |
none |
|
front, gripper |
none |
|
front |
front |
|
front, gripper |
front |
|
front, gripper |
front, gripper |
|
front, gripper |
gripper |
|
none |
front, gripper |
|
gripper |
gripper |
|
gripper |
none |
A preset without RGB turns target conditioning off.
Depth#
All fresh runs only. Any depth input also turns on --per_cam_norm.
Flag |
Default |
Description |
|---|---|---|
|
off |
Use depth (raw depth, back-projected to a pointmap on the GPU). Without |
|
|
Depth encoder: |
|
off |
Sparse PointNet encoder. Only read when |
|
|
Pointmap encoder backbone (e.g. |
|
none |
Decode depth from RG8-packed videos in |
|
none |
Read depth from gray HEVC videos |
|
off |
RGB-guided depth noise augmentation. |
|
|
Blend of clean and corrupted depth (1.0 = clean). |
|
off |
Per-camera pointmap normalization bounds instead of global ones. |
Target conditioning#
All fresh runs only.
Flag |
Default |
Description |
|---|---|---|
|
on |
Target heatmap as cross-attention context tokens. |
|
off |
Heatmap fused into the AdaLN time conditioning. |
|
off |
Gaussian bias on the RGB tokens, without a heatmap encoder. |
|
off |
Learned per-patch encoding on the RGB tokens, without a heatmap encoder. |
|
off |
No target conditioning. |
|
|
Heatmap encoder for |
|
|
Probability of dropping the target conditioning during training. |
|
|
Gaussian sigma of the heatmap, in patches. |
The five mode flags are mutually exclusive, but at this commit --token is on by default and
checked first, so --timestep_concat, --target_embedding and --target_pe have no
effect: the mode is token unless --no_target is given.
Language conditioning#
All fresh runs only.
Flag |
Default |
Description |
|---|---|---|
|
on |
Language conditioning (already on; turn it off with |
|
off |
Disable language conditioning. |
|
|
T5 encoder: |
|
|
|
|
|
|
Action-chunk labelling#
All fresh runs only.
Flag |
Default |
Description |
|---|---|---|
|
off |
When a pick, place, flip or rotate switch falls inside a chunk, repeat that frame’s action for the rest of the chunk and set done = 1 from the switch. Not with |
|
off |
When the lookback crosses a goal change, relabel the chunk as “hold position”. Needs |
Diagnostics#
Flag |
Default |
Description |
|---|---|---|
|
off |
Save the preprocessed first batch to |
|
off |
Save an ASCII architecture diagram to |
|
|
cProfile the first N steps on rank 0, dumped to |
|
off |
Set |
Checks the script enforces#
The script stops with an error for:
a new run without
--data_root_dir;--num_nodesabove 1 without--run_idor--resume;--depth_rg8together with--depth_g12;--freeze_on_goal_changewithout--use_previous_front_frame;--pause_on_attempttogether with--use_previous_front_frame;no visible GPU and no
--num_gpus_per_node(not checked with--dry_run);--optimizer muonwithout themuonpackage installed (not checked with--dry_run);--resumeof a run without<run_root_dir>/<run_id>/config.yaml(not checked with--dry_run).
Run name#
A fresh run’s ID is <datasets>_<horizon>_<n_action_steps>_<action_mode> plus a suffix for
each non-default choice, then a -<MM-DD-HH-MM-SS> timestamp:
the target mode, heatmap encoder, mask and sigma (
_token_shared_rgb_mask0.1_sigma0.8);the language model and mode (
_lang_t5-small_action_only);the camera preset (for example
_FGd) and depth encoder;the backbone, state, filtering, ratio, optimizer and labelling flags.
--rgb_224, --max_episodes and --target_crop add the prefixes rgb224_, Ep<N>_ and
tcrop<N>_, and --user_prefix goes in front of everything. IDs longer than 122 characters
are truncated before the timestamp, so that --resume accepts them. --run_id replaces the
whole ID, timestamp included.