Skip to content Skip to sidebar Skip to footer

Tqdm Progress Bar And Multiprocessing

I'm trying to add a progression bar to my program, however, solutions that seems to works for other (on other posts) do not work for me. Python version 3.6. import multiprocessing

Solution 1:

Unfortunately, tqdm is not working with starmap. You can use the following:

def f(args):
  arg1, arg2 = args
  ... do something with arg1, arg2 ...


for _ in tqdm.tqdm(pool.imap_unordered(f, zip(list_of_args, list_of_args2)), total=total):
    pass

Post a Comment for "Tqdm Progress Bar And Multiprocessing"