From a273ddd4991027d6280e24c9f73fa626425f0296 Mon Sep 17 00:00:00 2001 From: Paul Gibbons <87940629+paul-gibbons@users.noreply.github.com> Date: Tue, 19 Nov 2024 12:26:49 -0800 Subject: [PATCH] update symlink option for save_last in ModelCheckpoint (#11319) Signed-off-by: paul-gibbons --- nemo/lightning/pytorch/callbacks/model_checkpoint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nemo/lightning/pytorch/callbacks/model_checkpoint.py b/nemo/lightning/pytorch/callbacks/model_checkpoint.py index ca4ca08cab08..455022b1ba44 100644 --- a/nemo/lightning/pytorch/callbacks/model_checkpoint.py +++ b/nemo/lightning/pytorch/callbacks/model_checkpoint.py @@ -17,7 +17,7 @@ import shutil from datetime import timedelta from pathlib import Path -from typing import Any, Dict, Iterable, List, Optional, Union +from typing import Any, Dict, Iterable, List, Literal, Optional, Union import lightning.pytorch import torch @@ -63,7 +63,7 @@ def __init__( self, monitor: Optional[str] = "val_loss", verbose: bool = True, - save_last: Optional[bool] = True, + save_last: Optional[Union[bool, Literal["link"]]] = True, save_top_k: int = 3, save_weights_only: bool = False, ## TODO: check support mode: str = "min",