unilab.utils.checkpoint.resolve_checkpoint_path¶
- unilab.utils.checkpoint.resolve_checkpoint_path(task_log_root, load_run, *, checkpoint=None, suffix='.pt')[source]¶
Resolve a checkpoint from a task log root.
load_runselects the run:"-1"picks the latest run undertask_log_root; any other value is first tried as a direct path and then relative totask_log_root, and may name either a run directory or a checkpoint file.checkpointoptionally selects one checkpoint inside the resolved run (an iteration number or a filename).Returns
(checkpoint_path, run_dir). A resolved run that lacks the requested (or any) checkpoint yields(None, run_dir); an unresolvable run yields(None, None).