module adabmDCA.checkpoint
Training checkpoints and the versioned human-readable training log.
Global Variables
- DEFAULT_CHECKPOINT_INTERVAL
- HEADER_EVERY
- PHASES
- LOG_FORMAT_VERSION
class Checkpoint
Save model state and write the training history, events and readable log.
history.csv gains one row per update and is rewritten whenever the history changes retroactively (resume, recovery). events.jsonl gains one JSON object per event. The readable log holds the run metadata, a narrow progress table with events as » lines, and the end summary.
method __init__
__init__(
file_paths: 'dict[str, str]',
tokens: 'str',
metadata: 'Mapping[str, Any]',
use_wandb: 'bool' = False,
config: 'TrainingConfig | None' = None,
resume: 'bool' = False
) → None
method begin_stage
begin_stage(stage: 'str', metadata: 'dict[str, Any]') → None
Record a phase change or an event; returning to the current phase is not recorded.
method bind_counters
bind_counters(counters: 'Any') → None
Share the controller's counters, which place events in the run.
method check
check(updates: 'int') → bool
Return whether this update requires a persisted checkpoint.
method event
event(name: 'str', details: 'Mapping[str, Any]') → None
Record one event in events.jsonl and, if describable, as a » log line.
method finish
finish(status: 'str', summary: 'Mapping[str, Any]') → None
Append exactly one terminal status section.
method log
log(record: 'dict[str, Any]') → None
Write a record for direct callers.
method log_with_context
log_with_context(record: 'dict[str, Any]', counters: 'Any | None') → None
Append one update to the history table and the progress table.
method resumed
resumed(step: 'int') → None
method rewrite_history
rewrite_history(history: 'Mapping[str, list[Any]]') → None
Replace history.csv after the history changed retroactively (resume, recovery).
method save
save(
params: 'dict[str, Tensor]',
mask: 'Tensor',
chains: 'Tensor',
ptt_sampler=None
) → None
Save parameters and chains.
This file was automatically generated via lazydocs.