From 7677e5c0e2a8f87db87f46dec1821698cc625acb Mon Sep 17 00:00:00 2001 From: svlandeg Date: Tue, 15 Sep 2020 12:56:33 +0200 Subject: [PATCH] fix wandb logger when calling multiple times from same script --- spacy/training/loggers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacy/training/loggers.py b/spacy/training/loggers.py index 66fe25ed6..92b598033 100644 --- a/spacy/training/loggers.py +++ b/spacy/training/loggers.py @@ -72,7 +72,7 @@ def wandb_logger(project_name: str, remove_config_values: List[str] = []): for field in remove_config_values: del config_dot[field] config = util.dot_to_dict(config_dot) - wandb.init(project=project_name, config=config) + wandb.init(project=project_name, config=config, reinit=True) console_log_step, console_finalize = console(nlp) def log_step(info: Dict[str, Any]): @@ -88,7 +88,7 @@ def wandb_logger(project_name: str, remove_config_values: List[str] = []): def finalize(): console_finalize() - pass + wandb.join() return log_step, finalize