mednet.utils.checkpointer¶
Module Attributes
Standard paths where checkpoints may be (if produced with this framework). |
Functions
Return the best checkpoint file path to resume training from. |
|
Return the best checkpoint file path to run inference with. |
- mednet.utils.checkpointer.CHECKPOINT_ALIASES = {'best': 'model-at-lowest-validation-loss-{epoch}', 'periodic': 'model-at-{epoch}'}¶
Standard paths where checkpoints may be (if produced with this framework).
- mednet.utils.checkpointer.get_checkpoint_to_resume_training(path)[source]¶
Return the best checkpoint file path to resume training from.
- Parameters:
path (
Path
) – The base directory containing either the “periodic” checkpoint to start the training session from.- Returns:
Path to a checkpoint file that exists on disk.
- Return type:
- Raises:
FileNotFoundError – If none of the checkpoints can be found on the provided directory.
- mednet.utils.checkpointer.get_checkpoint_to_run_inference(path)[source]¶
Return the best checkpoint file path to run inference with.
- Parameters:
path (
Path
) – The base directory containing either the “best”, “last” or “periodic” checkpoint to start the training session from.- Returns:
Path to a checkpoint file that exists on disk.
- Return type:
- Raises:
FileNotFoundError – If none of the checkpoints can be found on the provided directory.