Skip to main content

checkpointing-and-tracking

Save and resume Accelerate training state, register checkpoint hooks and custom state, log safely across processes, use experiment trackers, profile runs, and clean up memory.

설치로 이동

소스 정보

저장소
VectorSpaceLab/AREX-Skill
최근 소스 활동
2026년 8월 26일 16:31
감지된 SKILL.md 언어
영어
스타
12
포크
2

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
6 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
checkpointing-and-tracking
description
Save and resume Accelerate training state, register checkpoint hooks and custom state, log safely across processes, use experiment trackers, profile runs, and clean up memory.
disable-model-invocation
true
metadata
{"disco-role":"operating"}
license
Apache 2.0
# Checkpointing and Tracking Use this sub-skill when the task involves Accelerate checkpoint save/load, model export, tracker initialization/logging, distributed-safe logging, profiling, state/RNG handling, or memory cleanup around those workflows. ## Route First - For the core forward/backward/optimizer loop, gradient accumulation, prepared dataloaders, and `skip_first_batches`, use `../training-loop-integration/`. - For FSDP, DeepSpeed, Megatron-LM, or backend-specific checkpoint strategy and consolidation details, use `../distributed-training-backends/`. - For large-model dispatch/offload checkpoint loading, route to the large-model or big-modeling sub-skill if present. ## Fast Workflows - Save and resume same-script training state with `Accelerator.save_state()` and `Accelerator.load_state()`; see `references/checkpointing.md`. - Configure automatic checkpoint folders and retention with `ProjectConfiguration`; see `references/checkpointing.md`. - Register custom checkpointable objects and save/load pre-hooks for extra metadata; see `references/checkpointing.md`. - Initialize trackers with `Accelerator(log_with=...)`, `init_trackers()`, `log()`, `get_tracker()`, and `end_training()`; see `references/tracking-and-logging.md`. - Use `accelerate.logging.get_logger()` for multiprocess-safe logs and ordered rank logs; see `references/tracking-and-logging.md`. - Profile CPU/GPU/XPU sections with `ProfileKwargs` and `accelerator.profile()`; see `references/tracking-and-logging.md`. - Diagnose common failures using `references/troubleshooting.md` before changing training code. ## Bundled Helper - Run `python scripts/checkpoint_tracker_smoke.py --help` for usage. - Run `python scripts/checkpoint_tracker_smoke.py` to verify a CPU-only tiny save/load/custom-tracker/logging smoke test without any external tracker service. ## Key Constraints - `save_state()`/`load_state()` are for resuming the same training script shape, not arbitrary model conversion between unrelated scripts. - Register custom objects only if they implement both `state_dict()` and `load_state_dict()`. - For ordinary model artifact export, prefer `accelerator.unwrap_model()`, `accelerator.get_state_dict()`, `accelerator.save()`, or `accelerator.save_model()` rather than treating a training-state checkpoint as a deployment artifact.
GitHub에서 보기