A Christmas gift

(Jeremy Howard (Admin)) #1

Here is a special Christmas gift to you all:

from tqdm import tqdm as tqdm_cls

inst = tqdm_cls._instances
for i in range(len(inst)): inst.pop().close()

You know how if you have an exception during training then after that the progress bar in jupyter goes crazy and shows each update on a separate line, and it drives you totally crazy?

Well, after you have an exception, run the code above, and your sanity is restored! :slight_smile:

(I’ll add this in to fastai to happen automatically soon, but I thought this was too great not to share in the meantime!)

52 Likes

(Vikram Kalabi) #2

This really is a gift. Thanks a lot @jeremy. This is really helpful while running long training processes.
Merry Christmas everyone!

0 Likes

(MichaelRosenblatt) #3

Thanks a lot @jeremy and everything about this amazing course!
I wish everyone here a Merry Christmas!

0 Likes

(Charin) #4

BEST. GIFT. EVER.
Thanks Jeremy!

0 Likes

#5

lol, I thought I was the only one that was annoyed by this. I would restart my kernel just to prevent this from happening.

0 Likes

#6

Such a great gift! Thanks @jeremy!

0 Likes

(Chris Palmer) #7

Thanks Jeremy!

Have you ever tried using the code in Jupyter Lab? It always shows each update on a separate line - at least it did last time I tried it a couple of months ago…

0 Likes

(Jeremy Howard (Admin)) #8

This is automatically run by fastai now :slight_smile: Let me know if anyone sees the problem again.

6 Likes