Tqdm: progress bar reprints when located in each thread of ThreadPoolExecutor #1464
Unanswered
nono-london
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a Tqdm in a function that runs in ThreadPoolExecutor. Problem is that the progress bar of each Thread re-prints every time it gets updated. I would like the 3 bars to stay put and update with their respective progress.
The code is from a tutorial, which does work in notebooks:
https://medium.com/@harshit4084/track-your-loop-using-tqdm-7-ways-progress-bars-in-python-make-things-easier-fcbbb9233f24#id_token=eyJhbGciOiJSUzI1NiIsImtpZCI6ImFjZGEzNjBmYjM2Y2QxNWZmODNhZjgzZTE3M2Y0N2ZmYzM2ZDExMWMiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJuYmYiOjE2ODA4MDQzMDcsImF1ZCI6IjIxNjI5NjAzNTgzNC1rMWs2cWUwNjBzMnRwMmEyamFtNGxqZGNtczAwc3R0Zy5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbSIsInN1YiI6IjEwMjg0MTgyNTIxNTk0MjQzMTIxMSIsImVtYWlsIjoibXlzcWxwcm9qZWN0QGdtYWlsLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJhenAiOiIyMTYyOTYwMzU4MzQtazFrNnFlMDYwczJ0cDJhMmphbTRsamRjbXMwMHN0dGcuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJuYW1lIjoiTm9ubyBMb25kb24iLCJwaWN0dXJlIjoiaHR0cHM6Ly9saDMuZ29vZ2xldXNlcmNvbnRlbnQuY29tL2EvQUdObXl4WnFjaUxXUTN1RFBpZXhmQUNLdFVCcmlBMGVfU1RQaVptMHl2XzU9czk2LWMiLCJnaXZlbl9uYW1lIjoiTm9ubyIsImZhbWlseV9uYW1lIjoiTG9uZG9uIiwiaWF0IjoxNjgwODA0NjA3LCJleHAiOjE2ODA4MDgyMDcsImp0aSI6ImMxMjc1Yjk2NGIwNzEzZmU3NDNiYzYyNzU1MWNkOWNmOTkzZjY3MjkifQ.mmC9uOfWsCoduUikH-jL_wNkGexfmkJLh7kPLqPoWnynkOnrJncCiMmOnZnQ43OKscxiaCKvyxEjrCqT_wZvZyR_a9w3FW6nYXSErswoJhNT9U9eOa7a_Lu9lVAwv0gQruOs7-Rc5q6BMdFTEtz8rCKbj8MWuZwXBBx5WB3BxdDQ395H5aCW87MWsiBEXJUQwspoajxC_OQ2BggnNAurADKSG_rBaNOu-355BsF6m3pExOI-nwtOC9pCTlMtDB9YwQMsCYO-qyh53fp_RjABQJAQueTqYw9BDPC9tHf2nfRoQCNZ6UuUholSZ-Xeagd09ClAm-09iIMpwO9JEMprYg
Other examples I found on stackoverflow use Tqdm at the executor level. My Tqdm are placed at the executed function level and I would like to know if it is possible to do this.
I use Windows10, PyCHarm and Python 3.9.
I tried both
and
Beta Was this translation helpful? Give feedback.
All reactions