Home > database >  ZeroDivisionError in the eval function for hub.compute when kept a default value of 1 for the num_wo
ZeroDivisionError in the eval function for hub.compute when kept a default value of 1 for the num_wo

Time:03-20

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.

CodePudding user response:

The default value for num_workers is 0, which is referenced in the Hub source code. So, I believe the problem is that you set the eval function 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.

  • Related