def get_default_model_checkpoint()

in torchrecipes/core/base_train_app.py [0:0]


    def get_default_model_checkpoint(self) -> OSSModelCheckpoint:
        """
        Override this method to return a default ModelCheckpoint callback.
        Note: If you want to use more than 1 ModelCheckpoint callback, add it through
        get_callbacks() function.
        """
        dirpath: Optional[str] = None
        root_dir = self.root_dir
        if root_dir:
            dirpath = os.path.join(root_dir, "checkpoints")
        return ModelCheckpoint(
            # will auto generate dirpath if not provided
            dirpath=dirpath,
            save_top_k=-1,
            has_user_data=False,
            ttl_days=1,
            monitor=None,
        )