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.