问题解决
RuntimeError: unable to write to file </torch_xxx>: No space left on device (28)
问题描述:
Traceback (most recent call last):
File "/opt/conda/lib/python3.10/multiprocessing/queues.py", line 244, in _feed
obj = _ForkingPickler.dumps(obj)
File "/opt/conda/lib/python3.10/multiprocessing/reduction.py", line 51, in dumps
cls(buf, protocol).dump(obj)
File "/opt/conda/lib/python3.10/site-packages/torch/multiprocessing/reductions.py", line 366, in reduce_storage
fd, size = storage._share_fd_cpu_()
RuntimeError: unable to write to file </torch_13201_320703969_7044>: No space left on device (28)
这个报错一般出现在docker容器中,因共享内存不足而报的错。问题原因与解决方法在PyTorch官网有说明:https://pypi.org/project/torch 搜索"docker image"