Update train folder 2026-08-11
Browse files- REGEN-main/train/__pycache__/train_demochan.cpython-310.pyc +0 -0
- REGEN-main/train/__pycache__/train_demochan.cpython-313.pyc +0 -0
- REGEN-main/train/__pycache__/train_forget.cpython-310.pyc +0 -0
- REGEN-main/train/__pycache__/train_forget.cpython-313.pyc +0 -0
- REGEN-main/train/__pycache__/train_ft.cpython-310.pyc +0 -0
- REGEN-main/train/__pycache__/train_new.cpython-310.pyc +0 -0
- REGEN-main/train/__pycache__/train_realft.cpython-310.pyc +0 -0
- REGEN-main/train/train_demochan.py +8 -1
- REGEN-main/train/train_forget.py +10 -6
- REGEN-main/train/train_new.py +190 -0
REGEN-main/train/__pycache__/train_demochan.cpython-310.pyc
ADDED
|
Binary file (20.2 kB). View file
|
|
|
REGEN-main/train/__pycache__/train_demochan.cpython-313.pyc
ADDED
|
Binary file (29.3 kB). View file
|
|
|
REGEN-main/train/__pycache__/train_forget.cpython-310.pyc
ADDED
|
Binary file (5.35 kB). View file
|
|
|
REGEN-main/train/__pycache__/train_forget.cpython-313.pyc
ADDED
|
Binary file (5.64 kB). View file
|
|
|
REGEN-main/train/__pycache__/train_ft.cpython-310.pyc
ADDED
|
Binary file (3.1 kB). View file
|
|
|
REGEN-main/train/__pycache__/train_new.cpython-310.pyc
ADDED
|
Binary file (5.21 kB). View file
|
|
|
REGEN-main/train/__pycache__/train_realft.cpython-310.pyc
ADDED
|
Binary file (3.36 kB). View file
|
|
|
REGEN-main/train/train_demochan.py
CHANGED
|
@@ -123,6 +123,7 @@ class Settings:
|
|
| 123 |
expected_replay_demos_per_task: int | None = None
|
| 124 |
resume_expected_iteration: int | None = None
|
| 125 |
sampling_optimizer_steps: int | None = None
|
|
|
|
| 126 |
|
| 127 |
|
| 128 |
@dataclass(frozen=True)
|
|
@@ -355,6 +356,10 @@ def validate(settings: Settings, *, allow_busy_override: bool = False) -> tuple[
|
|
| 355 |
raise ValueError("all scheduled current-task fractions must be in (0,1)")
|
| 356 |
if settings.coverage_window_steps <= 0:
|
| 357 |
raise ValueError("COVERAGE_WINDOW_STEPS must be positive")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 358 |
if (
|
| 359 |
settings.expected_replay_demos_per_task is not None
|
| 360 |
and settings.expected_replay_demos_per_task <= 0
|
|
@@ -493,6 +498,7 @@ def build_env(settings: Settings, paths: OutputPaths) -> dict[str, str]:
|
|
| 493 |
"DEMOCHAN_MAX_REPLAY_DEMOS": str(settings.max_replay_demos),
|
| 494 |
"DEMOCHAN_CURRENT_TASK_STEP_FRACTION": str(settings.current_task_step_fraction),
|
| 495 |
"DEMOCHAN_HIERARCHICAL_SAMPLING": str(settings.hierarchical_sampling).lower(),
|
|
|
|
| 496 |
"DEMOCHAN_CURRENT_TASK_FRACTION_SCHEDULE": ",".join(
|
| 497 |
f"{step}:{fraction}"
|
| 498 |
for step, fraction in settings.current_task_fraction_schedule
|
|
@@ -534,7 +540,8 @@ def print_banner(
|
|
| 534 |
replay_description = (
|
| 535 |
f"{replay['demos']} demos / {replay['steps']} steps; hierarchical schedule="
|
| 536 |
f"{list(settings.current_task_fraction_schedule)}; "
|
| 537 |
-
f"coverage_window={settings.coverage_window_steps} optimizer steps"
|
|
|
|
| 538 |
)
|
| 539 |
else:
|
| 540 |
replay_description = (
|
|
|
|
| 123 |
expected_replay_demos_per_task: int | None = None
|
| 124 |
resume_expected_iteration: int | None = None
|
| 125 |
sampling_optimizer_steps: int | None = None
|
| 126 |
+
hierarchical_chunk_sampling: str = "random"
|
| 127 |
|
| 128 |
|
| 129 |
@dataclass(frozen=True)
|
|
|
|
| 356 |
raise ValueError("all scheduled current-task fractions must be in (0,1)")
|
| 357 |
if settings.coverage_window_steps <= 0:
|
| 358 |
raise ValueError("COVERAGE_WINDOW_STEPS must be positive")
|
| 359 |
+
if settings.hierarchical_chunk_sampling not in {"random", "shuffled_queue"}:
|
| 360 |
+
raise ValueError(
|
| 361 |
+
"hierarchical_chunk_sampling must be 'random' or 'shuffled_queue'"
|
| 362 |
+
)
|
| 363 |
if (
|
| 364 |
settings.expected_replay_demos_per_task is not None
|
| 365 |
and settings.expected_replay_demos_per_task <= 0
|
|
|
|
| 498 |
"DEMOCHAN_MAX_REPLAY_DEMOS": str(settings.max_replay_demos),
|
| 499 |
"DEMOCHAN_CURRENT_TASK_STEP_FRACTION": str(settings.current_task_step_fraction),
|
| 500 |
"DEMOCHAN_HIERARCHICAL_SAMPLING": str(settings.hierarchical_sampling).lower(),
|
| 501 |
+
"DEMOCHAN_HIERARCHICAL_CHUNK_SAMPLING": settings.hierarchical_chunk_sampling,
|
| 502 |
"DEMOCHAN_CURRENT_TASK_FRACTION_SCHEDULE": ",".join(
|
| 503 |
f"{step}:{fraction}"
|
| 504 |
for step, fraction in settings.current_task_fraction_schedule
|
|
|
|
| 540 |
replay_description = (
|
| 541 |
f"{replay['demos']} demos / {replay['steps']} steps; hierarchical schedule="
|
| 542 |
f"{list(settings.current_task_fraction_schedule)}; "
|
| 543 |
+
f"coverage_window={settings.coverage_window_steps} optimizer steps; "
|
| 544 |
+
f"chunk_sampling={settings.hierarchical_chunk_sampling}"
|
| 545 |
)
|
| 546 |
else:
|
| 547 |
replay_description = (
|
REGEN-main/train/train_forget.py
CHANGED
|
@@ -63,9 +63,11 @@ if SAVE_ITER != STAGE_END_ITER:
|
|
| 63 |
# 每次进程只使用当前阶段的固定比例;阶段之间通过完整checkpoint续训。
|
| 64 |
CURRENT_TASK_FRACTION_SCHEDULE = ((0, CURRENT_TASK_FRACTION),)
|
| 65 |
|
| 66 |
-
# 任务
|
| 67 |
-
#
|
| 68 |
-
|
|
|
|
|
|
|
| 69 |
COVERAGE_WINDOW_STEPS = 10
|
| 70 |
|
| 71 |
# 仅Stage 1使用这个输入;Stage 2/3会强制改为同一OUTPUT_MODEL_DIR里的
|
|
@@ -122,8 +124,8 @@ def user_settings() -> shared.Settings:
|
|
| 122 |
replay_data_dir=replay_dir,
|
| 123 |
replay_task_ids=tuple(REPLAY_TASK_IDS),
|
| 124 |
max_replay_demos=MAX_REPLAY_DEMOS_PER_TASK,
|
| 125 |
-
#
|
| 126 |
-
current_task_step_fraction=
|
| 127 |
input_checkpoint=Path(INPUT_CHECKPOINT).expanduser(),
|
| 128 |
output_model_dir=Path(OUTPUT_MODEL_DIR).expanduser(),
|
| 129 |
max_iter=MAX_ITER,
|
|
@@ -141,7 +143,9 @@ def user_settings() -> shared.Settings:
|
|
| 141 |
coverage_window_steps=COVERAGE_WINDOW_STEPS,
|
| 142 |
expected_replay_demos_per_task=MAX_REPLAY_DEMOS_PER_TASK,
|
| 143 |
resume_expected_iteration=(STAGE_START_ITER or None),
|
| 144 |
-
sampling_optimizer_steps=
|
|
|
|
|
|
|
| 145 |
)
|
| 146 |
|
| 147 |
|
|
|
|
| 63 |
# 每次进程只使用当前阶段的固定比例;阶段之间通过完整checkpoint续训。
|
| 64 |
CURRENT_TASK_FRACTION_SCHEDULE = ((0, CURRENT_TASK_FRACTION),)
|
| 65 |
|
| 66 |
+
# 恢复demochan原始采样:先按目标current/replay比例复制当前任务的整条轨迹,
|
| 67 |
+
# 再由DistributedSampler打乱所有step/chunk起点。长轨迹因包含更多step而自然
|
| 68 |
+
# 获得更多训练样本;任务和轨迹不再强制等频。
|
| 69 |
+
HIERARCHICAL_SAMPLING = False
|
| 70 |
+
# 仅在重新启用HierarchicalReplaySampler时生效。
|
| 71 |
COVERAGE_WINDOW_STEPS = 10
|
| 72 |
|
| 73 |
# 仅Stage 1使用这个输入;Stage 2/3会强制改为同一OUTPUT_MODEL_DIR里的
|
|
|
|
| 124 |
replay_data_dir=replay_dir,
|
| 125 |
replay_task_ids=tuple(REPLAY_TASK_IDS),
|
| 126 |
max_replay_demos=MAX_REPLAY_DEMOS_PER_TASK,
|
| 127 |
+
# demochan通过整轨迹复制把step级current/replay比例调到本阶段目标。
|
| 128 |
+
current_task_step_fraction=CURRENT_TASK_FRACTION,
|
| 129 |
input_checkpoint=Path(INPUT_CHECKPOINT).expanduser(),
|
| 130 |
output_model_dir=Path(OUTPUT_MODEL_DIR).expanduser(),
|
| 131 |
max_iter=MAX_ITER,
|
|
|
|
| 143 |
coverage_window_steps=COVERAGE_WINDOW_STEPS,
|
| 144 |
expected_replay_demos_per_task=MAX_REPLAY_DEMOS_PER_TASK,
|
| 145 |
resume_expected_iteration=(STAGE_START_ITER or None),
|
| 146 |
+
sampling_optimizer_steps=(
|
| 147 |
+
STAGE_END_ITER - STAGE_START_ITER if HIERARCHICAL_SAMPLING else None
|
| 148 |
+
),
|
| 149 |
)
|
| 150 |
|
| 151 |
|
REGEN-main/train/train_new.py
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Three-stage forgetting trainer with balanced, no-replacement chunk queues.
|
| 3 |
+
|
| 4 |
+
This launcher is intentionally separate from ``train_forget.py``. It keeps the
|
| 5 |
+
same current/replay -> task -> trajectory balancing, while each trajectory owns
|
| 6 |
+
a shuffled queue of chunk starts. A start is not repeated until every start in
|
| 7 |
+
that trajectory has been visited once.
|
| 8 |
+
|
| 9 |
+
Run a configuration check:
|
| 10 |
+
./.venv/bin/python train/train_new.py --dry-run
|
| 11 |
+
|
| 12 |
+
Start the configured stage:
|
| 13 |
+
./.venv/bin/python train/train_new.py
|
| 14 |
+
"""
|
| 15 |
+
|
| 16 |
+
from __future__ import annotations
|
| 17 |
+
|
| 18 |
+
import argparse
|
| 19 |
+
import subprocess
|
| 20 |
+
import sys
|
| 21 |
+
from dataclasses import replace
|
| 22 |
+
from pathlib import Path
|
| 23 |
+
|
| 24 |
+
import train_demochan as shared
|
| 25 |
+
|
| 26 |
+
# =============================================================================
|
| 27 |
+
# USER CONFIG
|
| 28 |
+
# =============================================================================
|
| 29 |
+
|
| 30 |
+
GPU_IDS = [0, 1, 2, 3, 4, 5, 6, 7]
|
| 31 |
+
BATCH_SIZE_PER_GPU = 12
|
| 32 |
+
GRAD_ACCUM_STEPS = 3
|
| 33 |
+
|
| 34 |
+
CURRENT_DATA_DIR = (
|
| 35 |
+
"/mnt/workspace/users/luzheng/CL_lt/REGEN-main/"
|
| 36 |
+
"LIBERO-Cosmos-Policy/success_only/libero_goal_regen"
|
| 37 |
+
)
|
| 38 |
+
CURRENT_TASK_IDS = [6]
|
| 39 |
+
|
| 40 |
+
# Stage 1/2/3 normally use replay1/replay2/replay3 respectively.
|
| 41 |
+
REPLAY_DATA_DIR = "/mnt/workspace/users/luzheng/CL_lt/REGEN-main/task6/replay1"
|
| 42 |
+
REPLAY_TASK_IDS = [0, 1, 2, 3, 4, 5]
|
| 43 |
+
MAX_REPLAY_DEMOS_PER_TASK = 10
|
| 44 |
+
|
| 45 |
+
STAGE = 1
|
| 46 |
+
STAGE_CONFIGS = {
|
| 47 |
+
1: (0, 200, 200, 0.70),
|
| 48 |
+
2: (200, 500, 500, 0.60),
|
| 49 |
+
3: (500, 800, 800, 0.50),
|
| 50 |
+
}
|
| 51 |
+
if STAGE not in STAGE_CONFIGS:
|
| 52 |
+
raise ValueError(f"STAGE must be one of {sorted(STAGE_CONFIGS)}, got {STAGE}")
|
| 53 |
+
STAGE_START_ITER, STAGE_END_ITER, SAVE_ITER, CURRENT_TASK_FRACTION = STAGE_CONFIGS[
|
| 54 |
+
STAGE
|
| 55 |
+
]
|
| 56 |
+
if SAVE_ITER != STAGE_END_ITER:
|
| 57 |
+
raise ValueError(
|
| 58 |
+
f"stage {STAGE} must save only at its final iteration: "
|
| 59 |
+
f"SAVE_ITER={SAVE_ITER}, STAGE_END_ITER={STAGE_END_ITER}"
|
| 60 |
+
)
|
| 61 |
+
|
| 62 |
+
CURRENT_TASK_FRACTION_SCHEDULE = ((0, CURRENT_TASK_FRACTION),)
|
| 63 |
+
HIERARCHICAL_SAMPLING = True
|
| 64 |
+
HIERARCHICAL_CHUNK_SAMPLING = "shuffled_queue"
|
| 65 |
+
COVERAGE_WINDOW_STEPS = 10
|
| 66 |
+
|
| 67 |
+
INPUT_CHECKPOINT = (
|
| 68 |
+
"/mnt/workspace/users/luzheng/CL_lt/REGEN-main/checkpoints/imaginaire4-output/"
|
| 69 |
+
"cosmos_policy/cosmos_v2_finetune/"
|
| 70 |
+
"cosmos_predict2_2b_480p_libero_goal_base_stage_3gpu_40k_save4k_20260726/"
|
| 71 |
+
"checkpoints/iter_000040000"
|
| 72 |
+
)
|
| 73 |
+
|
| 74 |
+
# Keep this directory unchanged across all three stages.
|
| 75 |
+
OUTPUT_MODEL_DIR = (
|
| 76 |
+
"/mnt/workspace/users/luzheng/CL_lt/REGEN-main/out/"
|
| 77 |
+
"cosmos_policy/cosmos_v2_finetune/forget_task6_new_sampler_20260811"
|
| 78 |
+
)
|
| 79 |
+
|
| 80 |
+
MAX_ITER = STAGE_END_ITER
|
| 81 |
+
KEEP_NATIVE_800_STEP_LR = True
|
| 82 |
+
if not KEEP_NATIVE_800_STEP_LR:
|
| 83 |
+
raise ValueError(
|
| 84 |
+
"three-stage training requires KEEP_NATIVE_800_STEP_LR=True so all launches "
|
| 85 |
+
"share one continuous 800-step LR schedule"
|
| 86 |
+
)
|
| 87 |
+
MASTER_PORT = 12422
|
| 88 |
+
WANDB_MODE = "offline"
|
| 89 |
+
T5_TEXT_EMBEDDINGS_PATH = (
|
| 90 |
+
"/mnt/workspace/users/luzheng/CL_lt/REGEN-main/"
|
| 91 |
+
"LIBERO-Cosmos-Policy/success_only/t5_embeddings.pkl"
|
| 92 |
+
)
|
| 93 |
+
ALLOW_BUSY_GPUS = False
|
| 94 |
+
|
| 95 |
+
# =============================================================================
|
| 96 |
+
# END USER CONFIG
|
| 97 |
+
# =============================================================================
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
def user_settings() -> shared.Settings:
|
| 101 |
+
replay_dir = Path(REPLAY_DATA_DIR).expanduser() if REPLAY_DATA_DIR.strip() else None
|
| 102 |
+
return shared.Settings(
|
| 103 |
+
gpu_ids=tuple(GPU_IDS),
|
| 104 |
+
batch_size=BATCH_SIZE_PER_GPU,
|
| 105 |
+
grad_accum=GRAD_ACCUM_STEPS,
|
| 106 |
+
current_data_dir=Path(CURRENT_DATA_DIR).expanduser(),
|
| 107 |
+
current_task_ids=tuple(CURRENT_TASK_IDS),
|
| 108 |
+
replay_data_dir=replay_dir,
|
| 109 |
+
replay_task_ids=tuple(REPLAY_TASK_IDS),
|
| 110 |
+
max_replay_demos=MAX_REPLAY_DEMOS_PER_TASK,
|
| 111 |
+
current_task_step_fraction=CURRENT_TASK_FRACTION_SCHEDULE[-1][1],
|
| 112 |
+
input_checkpoint=Path(INPUT_CHECKPOINT).expanduser(),
|
| 113 |
+
output_model_dir=Path(OUTPUT_MODEL_DIR).expanduser(),
|
| 114 |
+
max_iter=MAX_ITER,
|
| 115 |
+
save_iter=SAVE_ITER,
|
| 116 |
+
keep_native_800_step_lr=KEEP_NATIVE_800_STEP_LR,
|
| 117 |
+
master_port=MASTER_PORT,
|
| 118 |
+
wandb_mode=WANDB_MODE,
|
| 119 |
+
t5_path=Path(T5_TEXT_EMBEDDINGS_PATH).expanduser(),
|
| 120 |
+
allow_busy_gpus=ALLOW_BUSY_GPUS,
|
| 121 |
+
process_seed=STAGE_START_ITER,
|
| 122 |
+
hierarchical_sampling=HIERARCHICAL_SAMPLING,
|
| 123 |
+
hierarchical_chunk_sampling=HIERARCHICAL_CHUNK_SAMPLING,
|
| 124 |
+
current_task_fraction_schedule=tuple(CURRENT_TASK_FRACTION_SCHEDULE),
|
| 125 |
+
coverage_window_steps=COVERAGE_WINDOW_STEPS,
|
| 126 |
+
expected_replay_demos_per_task=MAX_REPLAY_DEMOS_PER_TASK,
|
| 127 |
+
resume_expected_iteration=(STAGE_START_ITER or None),
|
| 128 |
+
sampling_optimizer_steps=STAGE_END_ITER - STAGE_START_ITER,
|
| 129 |
+
)
|
| 130 |
+
|
| 131 |
+
|
| 132 |
+
def main() -> int:
|
| 133 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 134 |
+
parser.add_argument("--dry-run", action="store_true")
|
| 135 |
+
parser.add_argument("--allow-busy-gpus", action="store_true")
|
| 136 |
+
parser.add_argument("--output-model-dir")
|
| 137 |
+
parser.add_argument("--no-replay", action="store_true")
|
| 138 |
+
args = parser.parse_args()
|
| 139 |
+
|
| 140 |
+
settings = user_settings()
|
| 141 |
+
if args.output_model_dir:
|
| 142 |
+
settings = replace(
|
| 143 |
+
settings, output_model_dir=Path(args.output_model_dir).expanduser()
|
| 144 |
+
)
|
| 145 |
+
if args.no_replay:
|
| 146 |
+
settings = replace(
|
| 147 |
+
settings,
|
| 148 |
+
replay_data_dir=None,
|
| 149 |
+
replay_task_ids=(),
|
| 150 |
+
hierarchical_sampling=False,
|
| 151 |
+
hierarchical_chunk_sampling="random",
|
| 152 |
+
current_task_fraction_schedule=(),
|
| 153 |
+
expected_replay_demos_per_task=None,
|
| 154 |
+
)
|
| 155 |
+
|
| 156 |
+
try:
|
| 157 |
+
settings, paths, current, replay = shared.validate(
|
| 158 |
+
settings,
|
| 159 |
+
allow_busy_override=args.allow_busy_gpus,
|
| 160 |
+
)
|
| 161 |
+
except (OSError, ValueError, subprocess.SubprocessError) as error:
|
| 162 |
+
print(f"[train_new] PRECHECK FAILED: {error}", file=sys.stderr)
|
| 163 |
+
return 2
|
| 164 |
+
|
| 165 |
+
return_code = shared.run(
|
| 166 |
+
settings,
|
| 167 |
+
paths,
|
| 168 |
+
current,
|
| 169 |
+
replay,
|
| 170 |
+
dry_run=args.dry_run,
|
| 171 |
+
launcher_name="train_new",
|
| 172 |
+
)
|
| 173 |
+
if return_code != 0 or args.dry_run:
|
| 174 |
+
return return_code
|
| 175 |
+
|
| 176 |
+
try:
|
| 177 |
+
shared.validate_output_checkpoint(paths, STAGE_END_ITER)
|
| 178 |
+
except (OSError, ValueError) as error:
|
| 179 |
+
print(f"[train_new] CHECKPOINT AUDIT FAILED: {error}", file=sys.stderr)
|
| 180 |
+
return 3
|
| 181 |
+
print(
|
| 182 |
+
f"[train_new] stage {STAGE} complete: full training state saved at "
|
| 183 |
+
f"iter_{STAGE_END_ITER:09d}",
|
| 184 |
+
flush=True,
|
| 185 |
+
)
|
| 186 |
+
return 0
|
| 187 |
+
|
| 188 |
+
|
| 189 |
+
if __name__ == "__main__":
|
| 190 |
+
raise SystemExit(main())
|