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

Cannot pickle dataset? #15

Open
252057052 opened this issue Oct 8, 2020 · 9 comments
Open

Cannot pickle dataset? #15

252057052 opened this issue Oct 8, 2020 · 9 comments

Comments

@252057052
Copy link

Can't pickle local object 'load_mosi..MOSI'

@frallisland
Copy link

you maybe download dataset firdt.

@Justin1904
Copy link
Owner

Can you provide more context? Like the full stack trace and where you download and put the data?

@Junge718
Copy link

Junge718 commented Mar 5, 2021

like this:
Traceback (most recent call last):
File "train_mosi.py", line 264, in
main(PARAMS)
File "train_mosi.py", line 131, in main
for batch in train_iterator:
File "D:\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 352, in iter
return self._get_iterator()
File "D:\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 294, in _get_iterator
return _MultiProcessingDataLoaderIter(self)
File "D:\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 801, in init
w.start()
File "D:\Anaconda3\lib\multiprocessing\process.py", line 105, in start
self._popen = self._Popen(self)
File "D:\Anaconda3\lib\multiprocessing\context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "D:\Anaconda3\lib\multiprocessing\context.py", line 322, in _Popen
return Popen(process_obj)
File "D:\Anaconda3\lib\multiprocessing\popen_spawn_win32.py", line 65, in init
reduction.dump(process_obj, to_child)
File "D:\Anaconda3\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'load_mosi..MOSI'

@Justin1904
Copy link
Owner

This looks weird, seems like the error is coming from inside the torch dataloader? Which version of pytorch is this

@Junge718
Copy link

This looks weird, seems like the error is coming from inside the torch dataloader? Which version of pytorch is this

It's 1.7.1. Maybe it's just because my OS is Windows.

@Justin1904 Justin1904 changed the title ? Cannot pickle dataset? May 19, 2021
@elmliu
Copy link

elmliu commented Aug 13, 2021

train_iterator = DataLoader(train_set, batch_size=batch_sz, num_workers=0, shuffle=True)
Works for me on Windows after changing num_workers=4 to 0. This is probably because multiprocessing lib doesn’t have it implemented on Windows.

@Weiyinyin11
Copy link

This looks weird, seems like the error is coming from inside the torch dataloader? Which version of pytorch is this

It's 1.7.1. Maybe it's just because my OS is Windows.

Has your problem been solved?

@Junge718
Copy link

Junge718 commented Dec 1, 2021 via email

@Weiyinyin11
Copy link

非常感谢您对我的问题的关注。我在 Linux 上试过,在 Linux 上没有问题。但是我仍然无法在 Windows 上运行代码。 

------------------ 原始邮件 ------------------ 发件人: "Justin1904/Low-rank-Multimodal-Fusion" @.>; 发送时间: 2021年12月1日(星期三) 晚上9:12 @.>; @.@.>; 主题: Re: [Justin1904/Low-rank-Multimodal-Fusion] Cannot pickle dataset? (#15) This looks weird, seems like the error is coming from inside the torch dataloader? Which version of pytorch is this It's 1.7.1. Maybe it's just because my OS is Windows. Has your problem been solved? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

Thank you for your reply. Is it convenient to leave a contact information?May I ask you some questions?

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

6 participants