Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

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.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading