Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

hack to stop tqdm hanging #1168

Merged
merged 1 commit into from
May 1, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions allennlp/common/tqdm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down