From e7569a8220b66d58074b43c86410529b125dee2f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bu=C4=9Fra?= <aldal.bugra@gmail.com>
Date: Fri, 30 Dec 2022 03:38:13 +0300
Subject: [PATCH] Added CSVLogger (#991)

---
 train.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/train.py b/train.py
index 1aff77dc02e..0c9fd72a3e0 100755
--- a/train.py
+++ b/train.py
@@ -170,6 +170,7 @@ def main(conf: DictConfig) -> None:
     # Setup trainer
     ######################################
     tb_logger = pl_loggers.TensorBoardLogger(conf.program.log_dir, name=experiment_name)
+    csv_logger = pl_loggers.CSVLogger(conf.program.log_dir, name=experiment_name)
 
     if isinstance(task, ObjectDetectionTask):
         monitor_metric = "val_map"
@@ -192,7 +193,7 @@ def main(conf: DictConfig) -> None:
     trainer_args = cast(Dict[str, Any], OmegaConf.to_object(conf.trainer))
 
     trainer_args["callbacks"] = [checkpoint_callback, early_stopping_callback]
-    trainer_args["logger"] = tb_logger
+    trainer_args["logger"] = [tb_logger, csv_logger]
     trainer_args["default_root_dir"] = experiment_dir
     trainer = pl.Trainer(**trainer_args)