Checkpoint recovery API

Inspect saved updates and explicitly restore a selected checkpoint. Update N is evaluated by pass N+1; the final update normally remains unevaluated. Evaluation health describes configured skip limits, nonzero processed counts and finite likelihood statistics, not recognition quality. Legacy telemetry without matching hashes is unverified.

Restoration never selects a checkpoint automatically. Stop concurrent training and readers first. The previous model is backed up under recovery-history; completion markers, provenance and cached sendump are invalidated before the selected parameters and counts are published. Training diagnostics and original checkpoints remain available. dry_run=True performs inspection only.

Public API for explicit checkpoint inspection and restoration.

pstrain.api.checkpoints.list_checkpoints(model_dir)[source]

Inspect retained update identities and their available evaluation evidence.

Parameters:

model_dir (Path)

Return type:

list[dict[str, Any]]

pstrain.api.checkpoints.restore_checkpoint(model_dir, number, *, dry_run=False)[source]

Explicitly restore one retained update, with a backup and stale provenance.

Parameters:
Return type:

dict[str, Any]