I was using Hub the Dataset format for AI and I ran function().eval(ds.tensor[:].numpy(), ds which gave me a zero division error.
However when I ran function().eval(ds.tensor[:].numpy(), ds, num_workers=2) I did not get the error.
I was using Hub version: 2.2.4.
The default value for
num_workersis 0, which is referenced in the Hub source code. So, I believe the problem is that you set theevalfunction to a default value of 1 rather than 0.The MNIST Dataset docs showcase how you can set the num_workers to the default value of 0.