Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tqdm RuntimeError: cannot join thread #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

CrafterKolyan
Copy link
Contributor

When training model occasionally you can receive RuntimeError: cannot join current thread:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/tqdm/_tqdm.py", line 885, in __del__
    self.close()
  File "/usr/local/lib/python3.7/dist-packages/tqdm/_tqdm.py", line 1090, in close
    self._decr_instances(self)
  File "/usr/local/lib/python3.7/dist-packages/tqdm/_tqdm.py", line 454, in _decr_instances
    cls.monitor.exit()
  File "/usr/local/lib/python3.7/dist-packages/tqdm/_monitor.py", line 52, in exit
    self.join()
  File "/usr/lib/python3.7/threading.py", line 1051, in join
    raise RuntimeError("cannot join current thread")
RuntimeError: cannot join current thread

This is known bug for tqdm starting from 4.22 to 4.28:
tqdm/tqdm#613

Fix: tqdm/tqdm#641
Even though PR for the fix is closed it is actually merged: tqdm/tqdm@6081329

Receiving RuntimeError means the training stops so that's critical.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant