Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/embodied/pi05/run_pi05_ddp_finetune.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ DATA_ARGS=(
--tokenizer-path $TOKENIZER_PATH
--robot-type libero_franka
--num-workers 16
--batch-drop-last
)

# ── Training params ───────────────────────────────────────────
Expand Down
1 change: 1 addition & 0 deletions examples/embodied/pi05/run_pi05_ddp_zero1_finetune.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ DATA_ARGS=(
--tokenizer-path $TOKENIZER_PATH
--robot-type libero_franka
--num-workers 16
--batch-drop-last
)

# ── Training params (aligned with examples/pi05/finetuning/sft_pi05.sh) ──
Expand Down
1 change: 1 addition & 0 deletions examples/embodied/pi05/run_pi05_fsdp_finetune.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ DATA_ARGS=(
--tokenizer-path $TOKENIZER_PATH
--robot-type libero_franka
--num-workers 16
--batch-drop-last
)

# -- Training params (aligned with examples/pi05/finetuning/sft_pi05.sh) ------
Expand Down
14 changes: 2 additions & 12 deletions loongforge/embodied/train/training_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,6 @@
# ---------------------------------------------------------------------------


def parse_bool(value: str) -> bool:
"""Parse bool from CLI text: true|false|1|0|yes|no."""
if value.strip().lower() in {"true", "t", "1", "yes"}:
return True
if value.strip().lower() in {"false", "f", "0", "no"}:
return False
raise argparse.ArgumentTypeError(f"Expected true/false, got: {value!r}")


def parse_reshard_after_forward(value: str):
"""Parse FSDP2 reshard_after_forward from CLI text: true|false|none|int>1."""
normalized = value.strip().lower()
Expand Down Expand Up @@ -667,13 +658,12 @@ class _DataArgs:
},
)
batch_drop_last: bool = field(
default=True,
default=False,
metadata={
"cli_type": parse_bool,
"help": (
"If True, drop the last incomplete batch so every rank sees the same "
"number of full-size batches. Applied to both sampler and DataLoader. "
"Default True preserves training stability."
"Default False preserves all samples."
),
},
)
Expand Down
Loading