From 92d3281005414ded31d941743a8e359356a2214c Mon Sep 17 00:00:00 2001 From: Mark Neumann Date: Tue, 1 May 2018 15:06:53 -0700 Subject: [PATCH] hack to stop tqdm hanging --- allennlp/common/tqdm.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/allennlp/common/tqdm.py b/allennlp/common/tqdm.py index 2767238f362..7d0652644a0 100644 --- a/allennlp/common/tqdm.py +++ b/allennlp/common/tqdm.py @@ -4,6 +4,13 @@ """ from tqdm import tqdm as _tqdm +# This is neccesary to stop tqdm from hanging +# when exceptions are raised inside iterators. +# It should have been fixed in 4.2.1, but it still +# occurs. +# TODO(Mark): Remove this once tqdm cleans up after itself properly. +# https://github.com/tqdm/tqdm/issues/469 +_tqdm.monitor_interval = 0 class Tqdm: # These defaults are the same as the argument defaults in tqdm.