Optimization-AI / LibAUC

LibAUC: A Deep Learning Library for X-Risk Optimization
https://libauc.org/
MIT License
273 stars 37 forks source link

Face bug on tutorial code #60

Open JY132 opened 1 week ago

JY132 commented 1 week ago

Hi, Good day.

I was running the code from https://docs.libauc.org/examples/auroc.html

And I face this error when I try to load the data

for data, targets in trainloader:

Traceback (most recent call last): File "", line 1, in File "C:\Users\Admin\anaconda3\envs\dino\lib\multiprocessing\spawn.py", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File "C:\Users\Admin\anaconda3\envs\dino\lib\multiprocessing\spawn.py", line 126, in _main self = reduction.pickle.load(from_parent) AttributeError: Can't get attribute 'ImageDataset' on <module 'main' (built-in)>

I am using Jupyter Notebook to run the code with Python 3.10.14

JY132 commented 1 week ago

Figured out how to debug it.

Just removing workers (num_workers argument) worked as a quick fix for me