CheckpointConfig¶
Bases: Serializable
Bundles MultiProgramRunner's checkpoint/execution-control settings
into a single object, reused by every loqs.tools runner that inherits
from MultiProgramRunner. item_checkpoint/shot_checkpoint are
derived read-only properties (not separate stored fields) computed from
whether the corresponding directory is set, since the two were always
required to agree with each other.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item_checkpoint_dir
|
str | Path | None
|
Directory to checkpoint per-item results to. Setting this to a
non- |
None
|
resume
|
bool
|
Whether to resume from an existing checkpoint at
|
False
|
force_resume
|
bool
|
Whether to bypass a resume-time mismatch check between this config's own domain-specific parameters and a stored checkpoint's. |
False
|
shot_checkpoint_dir
|
str | Path | None
|
Directory to checkpoint per-shot results to. Setting this to a
non- |
None
|
keep_shot_results
|
bool
|
Whether per-shot results are retained (read back from disk) rather
than discarded once each item completes. Requires both
|
False
|
poll_interval
|
float
|
Polling interval (seconds) used while waiting on dispatched work. |
1.0
|
show_progress
|
bool
|
Whether to display a progress bar while running. |
True
|
runner_filename
|
str
|
Filename used for the runner's own on-disk checkpoint state, under
|
'runner.h5'
|
results_filename
|
str
|
Filename used for each item's own on-disk shot checkpoint, under
|
'results.h5'
|
CheckpointConfig ¶
CheckpointConfig(item_checkpoint_dir: str | Path | None = None, resume: bool = False, force_resume: bool = False, shot_checkpoint_dir: str | Path | None = None, keep_shot_results: bool = False, poll_interval: float = 1.0, show_progress: bool = True, runner_filename: str = 'runner.h5', results_filename: str = 'results.h5') -> None
Attributes¶
decode¶
Inherited static method from Serializable.decode().
dump¶
Inherited method from Serializable.dump().
encode¶
Inherited static method from Serializable.encode().
load¶
Inherited class method from Serializable.load().
read¶
Inherited class method from Serializable.read().
serialize_function¶
Inherited static method from Serializable.serialize_function().
write¶
Inherited method from Serializable.write().