(self, model_dir: Union[str, Path])
Instantiating CheckpointManager class

        Args:
            model_dir (Union[str, Path]): directory path for saving a checkpoint
Instantiating CheckpointManager class
Instantiating CheckpointManager class
def __init__(self, model_dir: Union[str, Path]) -> None:
        """Instantiating CheckpointManager class

        Args:
            model_dir (Union[str, Path]): directory path for saving a checkpoint
        """
        if not isinstance(model_dir, Path):
            model_dir = Path(model_dir)

        if not model_dir.exists():
            model_dir.mkdir(parents=True)

        self._model_dir = model_dir
def __init__ ( self , model_dir : Union [ str , Path ] ) -> None : if not isinstance ( model_dir , Path ) : model_dir = Path ( model_dir ) if not model_dir . exists ( ) : model_dir . mkdir ( parents = True ) self . _model_dir = model_dir