Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
troubles with tqdm
#1
I have a problem with tqdm progress bar. I have a code like this my code with wrongly working tqdm
If I have printed the debugging messages I have really got this as the first line of the output:

HERE HERE Epoch: 395, Epochs: 396

But the progress bar stops already at 393 not at 395 as required,see the attachment to this post. This is not the case for all numbers, sometimes the progress bar really
stops at Epochs - 1. E.g., 388/389 [00:09<00:00, 43.03it/s] so, 389 is such a miraculous number where the progress bar from tqdm stops rightly at epochs -1 position. Also, changing the condition on the line 587 at the pastebin.com site above with
if epoch >= epochs : also gives an error. It BTW doesn't give an error if the program has been executed for several times before because
the Jupyter Notebook environment apparently remembers the data from the previous run. I'm saying this only because I was sooo happy that I have resolved the issue with tqdm but in fact I didn't. Where is the bug/problem with my code ?? Many thanks to all readers of this post.


EDIT
I have noticed that what is the miraculous number depends on the number of elements in this array, I think that the issue is some
modulo arithmetic but I'm uncertain with the exact eplanation:
Quote:new_persons_results = [
# [101, 112],
# [0.54422416, 0.02778176],
# [22.57372914, 17.96922325],
# [22.57372914, 17.96922325]
# Add more new persons as needed
# [23.65780072, 18.8599168 ],
# [22.57372914, 17.96922325],
# [32.55342397, 29.46365141],
# [ 6.71803504, 25.70466547],
# [ 6.71803504, 25.70466547],
# [14.40191857, 16.77085649],
# [17.45790731, 21.76521471],
# [2110.02796947, 73.45445955],
# [30.29513837, 62.90111289],
# [15.1289778, 32.40267702],

[23.65780072, 18.8599168 ],
[22.57372914, 17.96922325],
[32.55342397, 29.46365141],
[ 6.71803504, 25.70466547],
[14.40191857, 16.77085649],
[17.45790731, 21.76521471],
[20.02796947, 73.45445955],

]

Attached Files

Thumbnail(s)
   
Reply
#2
Write a short example that demonstrates the problem and post the example code, not a link to a private post on pastebin.

Jupyter notebook kind of works like a spreadsheet. You can change the contents of one cell and see how the change affects other cells.
Reply
#3
I have found the bug. It is that tqdm doesn't cooperate with Jupyter so nicely as tqdm_notebook does. Thank you for your help.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Installation troubles on Win 10 peringek 1 2,944 Dec-31-2020, 07:30 AM
Last Post: caleb_cruze
  converting user input to float troubles RecklessTechGuy 3 2,489 Aug-17-2020, 12:41 PM
Last Post: deanhystad
  csv troubles DPaul 4 2,354 Aug-13-2020, 05:18 PM
Last Post: DPaul
  Win32API Troubles daaaabs 2 2,961 Mar-24-2020, 08:19 PM
Last Post: daaaabs
  local variable troubles yokaso 4 3,211 Oct-20-2019, 05:25 PM
Last Post: ichabod801
  Troubles with instaling pocketsphinx Thais781 1 2,640 Aug-07-2018, 10:05 AM
Last Post: Larz60+
  Troubles with classes, taken from a book sylas 2 3,211 Jun-05-2017, 08:39 AM
Last Post: sylas
  [?] UTF8, Unicode and Binary data reading troubles doublezero 1 3,171 Mar-31-2017, 11:32 PM
Last Post: Ofnuts

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020