resolve_checkpoint_path

resolve_checkpoint_path(main_dir, subdirectory=None)[source]

Resolve the path to a checkpoint subdirectory.

Parameters:
  • main_dir (Path | str) – Main checkpoint directory.

  • subdirectory (str | None) – Specific checkpoint subdirectory to load (e.g., “checkpoint_001”). If None, loads the latest checkpoint based on iteration number.

Returns:

Path to the checkpoint subdirectory.

Return type:

Path

Raises:

CheckpointNotFoundError – If the main directory or specified subdirectory does not exist.