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

evaluate时gather_map 收集不同GPU数据时zip报错 #17

Open
Hou-Hou opened this issue Feb 22, 2023 · 0 comments
Open

evaluate时gather_map 收集不同GPU数据时zip报错 #17

Hou-Hou opened this issue Feb 22, 2023 · 0 comments

Comments

@Hou-Hou
Copy link

Hou-Hou commented Feb 22, 2023

Epoch 1/20
0%| | 0/1266 [00:00<?, ?it/s]Epoch=20
/home/root1/anaconda3/envs/prgc/lib/python3.7/site-packages/torch/nn/parallel/_functions.py:61: UserWarning: Was asked to gather along dimension 0, but all input tensors were scalars; will instead unsqueeze and return a vector.
warnings.warn('Was asked to gather along dimension 0, but all '
0%| | 0/1266 [01:55<?, ?it/s, loss=2.482, loss_mat=0.665, loss_rel=0.692, loss_seq=1.125]
0%| | 0/209 [01:11<?, ?Batch/s]
0%| | 0/1266 [03:06<?, ?it/s, loss=2.482, loss_mat=0.665, loss_rel=0.692, loss_seq=1.125]
Traceback (most recent call last):
File "/data00/home/hjj/code/RelationExtract/Joint_Extraction/PRGCLocal/evaluate.py", line 92, in evaluate
ex_params=ex_params)
File "/home/root1/anaconda3/envs/prgc/lib/python3.7/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/root1/anaconda3/envs/prgc/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 156, in forward
return self.gather(outputs, self.output_device)
File "/home/root1/anaconda3/envs/prgc/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 168, in gather
return gather(outputs, output_device, dim=self.dim)
File "/home/root1/anaconda3/envs/prgc/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 68, in gather
res = gather_map(outputs)
File "/home/root1/anaconda3/envs/prgc/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 63, in gather_map
return type(out)(map(gather_map, zip(*outputs)))
File "/home/root1/anaconda3/envs/prgc/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 63, in gather_map
return type(out)(map(gather_map, zip(*outputs)))
File "/home/root1/anaconda3/envs/prgc/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 63, in gather_map
return type(out)(map(gather_map, zip(*outputs)))
TypeError: zip argument #1 must support iteration

Process finished with exit code 1

image

@Hou-Hou Hou-Hou changed the title 中文数据集 数据加载报错 evaluate时gather_map 收集不同GPU数据时zip报错 Feb 23, 2023
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

1 participant