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

use generator arg in dataloader in cevae #3264

Merged
merged 2 commits into from
Aug 24, 2023
Merged

use generator arg in dataloader in cevae #3264

merged 2 commits into from
Aug 24, 2023

Conversation

martinjankowiak
Copy link
Collaborator

@martinjankowiak martinjankowiak commented Aug 24, 2023

i guess this is a torch bug? otherwise you get something like

  File "/home/mjankowiak/.local/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 628, in __next__
    data = self._next_data()
  File "/home/mjankowiak/.local/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 670, in _next_data
    index = self._next_index()  # may raise StopIteration
  File "/home/mjankowiak/.local/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 618, in _next_index
    return next(self._sampler_iter)  # may raise StopIteration
  File "/home/mjankowiak/.local/lib/python3.8/site-packages/torch/utils/data/sampler.py", line 254, in __iter__
    for idx in self.sampler:
  File "/home/mjankowiak/.local/lib/python3.8/site-packages/torch/utils/data/sampler.py", line 132, in __iter__
    yield from torch.randperm(n, generator=generator).tolist()
RuntimeError: Expected a 'cuda' device type for generator but found 'cpu'

@fritzo fritzo merged commit 1048a8b into dev Aug 24, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants