简体   繁体   中英

ZeroDivisionError in the eval function for hub.compute when kept a default value of 1 for the num_workers parameter

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_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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM