Skip to content

Commit

Permalink
Added CSVLogger (microsoft#991)
Browse files Browse the repository at this point in the history
  • Loading branch information
bugraaldal authored Dec 30, 2022
1 parent ef31509 commit e7569a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)

Expand Down

0 comments on commit e7569a8

Please sign in to comment.