From 1f04f81554a22522d2b942a37f80466a899bf6a5 Mon Sep 17 00:00:00 2001 From: Myle Ott Date: Sat, 7 Mar 2020 09:10:08 -0800 Subject: [PATCH] Fix logging error when tensorboard isn't installed (fixes #1794) (#1076) Summary: Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1076 Differential Revision: D20322669 Pulled By: myleott fbshipit-source-id: 84e89ef817171f58c0aade06b7b0181fe483240d --- fairseq/logging/progress_bar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fairseq/logging/progress_bar.py b/fairseq/logging/progress_bar.py index 7dd9d4a23a..ea929ce0ed 100644 --- a/fairseq/logging/progress_bar.py +++ b/fairseq/logging/progress_bar.py @@ -289,8 +289,8 @@ def print(self, stats, tag=None, step=None): try: - from tensorboardX import SummaryWriter _tensorboard_writers = {} + from tensorboardX import SummaryWriter except ImportError: SummaryWriter = None