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

possible deadlock in dataloader #8

Closed
nankepan opened this issue May 16, 2022 · 3 comments
Closed

possible deadlock in dataloader #8

nankepan opened this issue May 16, 2022 · 3 comments

Comments

@nankepan
Copy link

HI,
When I train a model with num_workers>1, it is possible to stuck on this line:

for index, data in enumerate(test_dataloader):

Then I debug and find that it stucks on this tow lines:
query_frames, query_masks = self.transforms(query_frames, query_masks)

support_frames, support_masks = self.transforms(support_frames, support_masks)

When I train a model when num_workers=0, it is normal but very slow.

The problem is similiar with this: pytorch/pytorch#1355. And I can not fix it using methods under this issue.
How can I fix the problem?

@scutpaul
Copy link
Owner

hi, if you need to train the model, you should use train_DAN.py.
the default setting for training num_workers is 4

parser.add_argument('--num_workers', type=int, default=4)

train_loader = DataLoader(traindataset, batch_size=args.batch_size, shuffle=True, num_workers=args.num_workers,

@nankepan
Copy link
Author

I did use train_DAN.py and set num_workers=4.Then sometime it is possible to stuck.

@scutpaul
Copy link
Owner

hi, you can download our conda yaml to create the python env.
FSVOS.yaml.zip

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

2 participants