Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generator keyword error #35

Open
KyriaAnnwyn opened this issue Jun 6, 2022 · 1 comment
Open

Generator keyword error #35

KyriaAnnwyn opened this issue Jun 6, 2022 · 1 comment

Comments

@KyriaAnnwyn
Copy link

KyriaAnnwyn commented Jun 6, 2022

I get this error when try to use safedataloader

dl = nc.SafeDataLoader(ds, batch_size = batch_ss, shuffle = shuffle)
File "/lib/python3.8/site-packages/nonechucks/dataloader.py", line 25, in call
obj = type.call(cls, args, **kwargs)
File "
/lib/python3.8/site-packages/nonechucks/dataloader.py", line 138, in init
super(SafeDataLoader, self).init(dataset, **kwargs)
File "
/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 277, in init
sampler = RandomSampler(dataset, generator=generator) # type: ignore[arg-type]
TypeError: safe_sampler_callable() got an unexpected keyword argument 'generator'

How can I fix it?

P.S. I'm using PyTorch (1.11.0+cu113)

@alexmehta
Copy link

I have the same issue. Did you find any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants