From 049125d20c4f1008c80592ec468dbeb5c765268f Mon Sep 17 00:00:00 2001 From: weijie Date: Wed, 9 Sep 2026 00:56:16 +0800 Subject: [PATCH] fix: respect checkpoint continuation for stages --- trinity/cli/launcher.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/trinity/cli/launcher.py b/trinity/cli/launcher.py index 685789eff6..78743ec4a3 100644 --- a/trinity/cli/launcher.py +++ b/trinity/cli/launcher.py @@ -387,7 +387,11 @@ def run( from trinity.trainer import get_latest_hf_checkpoint_path state_manager = StateManager(path=cfg.get_checkpoint_job_dir()) - latest_stage = state_manager.load_stage().get("latest_stage", 0) + latest_stage = ( + state_manager.load_stage().get("latest_stage", 0) + if cfg.continue_from_checkpoint + else 0 + ) prev_stage_checkpoint = None for i, stage_config in enumerate(cfg): if i < latest_stage: