Reputation: 2489
I have a frustrating problem, where I cannot debug my pytorch code while in Pycharm.
While trying to inspect (breakpoint, then print e.g.) the code below, I receive a "Loading time out"
import torch
tensors = []
num_tensors = 16
shape = (1, 3, 512, 512)
for i in range(num_tensors):
tensors.append(torch.zeros(shape))
I saw this[1,2] posts, set variable loading policy to syncronyous, disabled Qt debugger options, and all the options specified, But I believe there is something basic I'm missing.
pycharm 2019.2.5
, happens both in python2
and python3
.
Upvotes: 6
Views: 792
Reputation: 1854
Are you using DataLoader
? If yes, you can try reducing the num_workers
to 0
.
Upvotes: 5
Reputation: 642
I had this problem too. Both with the Pycharm version 2019.3.3, 2019.3.4 and 2019.2.6. I had to revert back to 2018.3.7 where it was working. I may have some parameters that caused the conflicts. It doesn't explain the underlying reason though...
Upvotes: 0