-
Notifications
You must be signed in to change notification settings - Fork 155
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
TypeError: cannot pickle 'torch._C.Generator' object #1404
Comments
Hi @AshwinSankar17 thanks for the report! Your stack trace is pretty mangled and hard to read, but I managed to guess at what's going on: It looks looks this is failing during worker initialization, and some object in the dataset holds a torch._C.Generator, which is failing to pickle. Can you share the code where StatefulDataLoader is used? Can you confirm that this succeeds with the normal DataLoader? I'm not sure where this generator is being introduced, I don't think there's anything in StatefulDataLoader which is doing this |
I was trying to finetune seamless_m4t here: https://github.com/AshwinSankar17/seamless_communication/blob/main/src/seamless_communication/cli/m4t/finetune/dataloader.py Vanilla DataLoader works without any problem. The issue only pops up when I use StatefulDataLoader. |
Hi @AshwinSankar17 I am on Python 3.11.9 btw.
here's how instantiate my stateful dataloader
And I run it using
to get the following output
|
🐛 Describe the bug
I tried replacing DataLoader to StatefulDataLoader in: https://github.com/facebookresearch/seamless_communication/blob/90e2b57ac4d82fa2bfaa25caeffe39ceb8b2ebec/src/seamless_communication/cli/m4t/finetune/dataloader.py#L127
and got the following error. Any help would be appreciated.
I am also seeding the finetuning instance with the following function:
Versions
The text was updated successfully, but these errors were encountered: