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

FeatureExtractionTool' object has no attribute '__collate_fn' #19

Open
shiyanshi2233 opened this issue Sep 30, 2022 · 2 comments
Open

Comments

@shiyanshi2233
Copy link

您好,我在执行feature = fet.run_dataset(dataset_dir="F:/数据库/CH-SIMS/SIMS", out_file="D:/python program/CH-IMS/output/feature.pkl")时报错:
File "", line 1, in
File "D:\zhoubm\anaconda\envs\python38\lib\multiprocessing\spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "D:\zhoubm\anaconda\envs\python38\lib\multiprocessing\spawn.py", line 126, in _main
self = reduction.pickle.load(from_parent)
AttributeError: 'FeatureExtractionTool' object has no attribute '__collate_fn'
Traceback (most recent call last):
File "D:\zhoubm\anaconda\envs\python38\lib\site-packages\torch\utils\data\dataloader.py", line 1163, in _try_get_data
data = self._data_queue.get(timeout=timeout)
File "D:\zhoubm\anaconda\envs\python38\lib\multiprocessing\queues.py", line 108, in get
raise Empty
_queue.Empty

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "D:\zhoubm\anaconda\envs\python38\lib\site-packages\MSA_FET\main.py", line 407, in run_dataset
for i, batch_data in enumerate(tqdm(dataloader)):
File "D:\zhoubm\anaconda\envs\python38\lib\site-packages\tqdm\std.py", line 1195, in iter
for obj in iterable:
File "D:\zhoubm\anaconda\envs\python38\lib\site-packages\torch\utils\data\dataloader.py", line 681, in next
data = self._next_data()
File "D:\zhoubm\anaconda\envs\python38\lib\site-packages\torch\utils\data\dataloader.py", line 1359, in _next_data
idx, data = self._get_data()
File "D:\zhoubm\anaconda\envs\python38\lib\site-packages\torch\utils\data\dataloader.py", line 1325, in _get_data
success, data = self._try_get_data()
File "D:\zhoubm\anaconda\envs\python38\lib\site-packages\torch\utils\data\dataloader.py", line 1176, in _try_get_data
raise RuntimeError('DataLoader worker (pid(s) {}) exited unexpectedly'.format(pids_str)) from e
RuntimeError: DataLoader worker (pid(s) 16448, 20520, 22228, 5700) exited unexpectedly
MMSA-FET - Removing temporary files.
这是在python3.8,win10系统下运行的,请问是哪里的配置不对吗?

@FlameSky-S
Copy link
Contributor

您好,旧版本的多进程有bug,在最新版中已经重写这部分代码。请尝试运行最新版的代码

@IndustryZoe
Copy link

您好,我在执行feature = fet.run_dataset(dataset_dir="F:/数据库/CH-SIMS/SIMS", out_file="D:/python program/CH-IMS/output/feature.pkl")时报错: File "", line 1, in File "D:\zhoubm\anaconda\envs\python38\lib\multiprocessing\spawn.py", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File "D:\zhoubm\anaconda\envs\python38\lib\multiprocessing\spawn.py", line 126, in _main self = reduction.pickle.load(from_parent) AttributeError: 'FeatureExtractionTool' object has no attribute '__collate_fn' Traceback (most recent call last): File "D:\zhoubm\anaconda\envs\python38\lib\site-packages\torch\utils\data\dataloader.py", line 1163, in _try_get_data data = self._data_queue.get(timeout=timeout) File "D:\zhoubm\anaconda\envs\python38\lib\multiprocessing\queues.py", line 108, in get raise Empty _queue.Empty

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "D:\zhoubm\anaconda\envs\python38\lib\site-packages\MSA_FET\main.py", line 407, in run_dataset for i, batch_data in enumerate(tqdm(dataloader)): File "D:\zhoubm\anaconda\envs\python38\lib\site-packages\tqdm\std.py", line 1195, in iter for obj in iterable: File "D:\zhoubm\anaconda\envs\python38\lib\site-packages\torch\utils\data\dataloader.py", line 681, in next data = self._next_data() File "D:\zhoubm\anaconda\envs\python38\lib\site-packages\torch\utils\data\dataloader.py", line 1359, in _next_data idx, data = self._get_data() File "D:\zhoubm\anaconda\envs\python38\lib\site-packages\torch\utils\data\dataloader.py", line 1325, in _get_data success, data = self._try_get_data() File "D:\zhoubm\anaconda\envs\python38\lib\site-packages\torch\utils\data\dataloader.py", line 1176, in _try_get_data raise RuntimeError('DataLoader worker (pid(s) {}) exited unexpectedly'.format(pids_str)) from e RuntimeError: DataLoader worker (pid(s) 16448, 20520, 22228, 5700) exited unexpectedly MMSA-FET - Removing temporary files. 这是在python3.8,win10系统下运行的,请问是哪里的配置不对吗?

我也出现了这个问题,请问一下,您这边解决了吗?

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

3 participants