From 12cd99ab1e3713fb4a588d645fcdd4c062fa758e Mon Sep 17 00:00:00 2001 From: Adarsh Shirawalmath <114558126+adarshxs@users.noreply.github.com> Date: Fri, 8 Dec 2023 16:16:51 +0530 Subject: [PATCH 1/3] Update utils.py LightningLoggerBase -> Logger LightningLoggerBase was deprecated https://github.com/Lightning-Universe/lightning-bolts/issues/962 --- training/src/utils/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/training/src/utils/utils.py b/training/src/utils/utils.py index 32e64ab4d..96c822576 100644 --- a/training/src/utils/utils.py +++ b/training/src/utils/utils.py @@ -134,7 +134,7 @@ def finish( datamodule: pl.LightningDataModule, trainer: pl.Trainer, callbacks: List[pl.Callback], - logger: List[pl.loggers.LightningLoggerBase], + logger: List[pl.loggers.Logger], ) -> None: """Makes sure everything closed properly.""" From 7902361e4daea6a815b6d81de620bbe3a2a52cf8 Mon Sep 17 00:00:00 2001 From: Adarsh Shirawalmath <114558126+adarshxs@users.noreply.github.com> Date: Wed, 10 Jan 2024 14:44:16 +0530 Subject: [PATCH 2/3] Update train.py --- training/src/train.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/training/src/train.py b/training/src/train.py index 8c92413e4..424c38b35 100644 --- a/training/src/train.py +++ b/training/src/train.py @@ -10,7 +10,7 @@ Trainer, seed_everything, ) -from pytorch_lightning.loggers import LightningLoggerBase +from pytorch_lightning.loggers import Logger from src.utils import utils @@ -59,7 +59,7 @@ def train(config: DictConfig) -> Optional[float]: callbacks.append(hydra.utils.instantiate(cb_conf)) # Init lightning loggers - logger: List[LightningLoggerBase] = [] + logger: List[Logger] = [] if "logger" in config: for _, lg_conf in config.logger.items(): if lg_conf is not None and "_target_" in lg_conf: From e8febafd2b218b3cefa4027e59e7d0696473e730 Mon Sep 17 00:00:00 2001 From: Adarsh Shirawalmath <114558126+adarshxs@users.noreply.github.com> Date: Wed, 10 Jan 2024 14:44:39 +0530 Subject: [PATCH 3/3] Update eval.py --- training/src/eval.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/training/src/eval.py b/training/src/eval.py index 161a23c89..d4fbca82e 100644 --- a/training/src/eval.py +++ b/training/src/eval.py @@ -12,7 +12,7 @@ Trainer, seed_everything, ) -from pytorch_lightning.loggers import LightningLoggerBase +from pytorch_lightning.loggers import Logger from src.utils import utils @@ -97,7 +97,7 @@ def evaluate(config: DictConfig) -> None: callbacks.append(hydra.utils.instantiate(cb_conf)) # Init Lightning loggers - logger: List[LightningLoggerBase] = [] + logger: List[Logger] = [] if "logger" in config: for _, lg_conf in config["logger"].items(): if lg_conf is not None and "_target_" in lg_conf: