The implementation of turning tqdm off/on is a bit complicated. It cold simple use the disable parameter from the package. Printing a bar for each batch could also be improved. It would be netter to update two bars, one for the number of batches, one for the items in the batches.
The implementation of turning tqdm off/on is a bit complicated. It cold simple use the disable parameter from the package. Printing a bar for each batch could also be improved. It would be netter to update two bars, one for the number of batches, one for the items in the batches.