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