Skip to content

Conversation

@ssnl
Copy link
Collaborator

@ssnl ssnl commented May 6, 2019

This is an attempt to isolate unrelated changes from #19228 for easier review.

@pytorchbot pytorchbot added the module: dataloader Related to torch.utils.data.DataLoader and Sampler label May 6, 2019
@ssnl ssnl force-pushed the psutil_hi_pri branch 2 times, most recently from fb41e26 to 66a8005 Compare May 6, 2019 07:02
@ezyang
Copy link
Contributor

ezyang commented May 6, 2019

@apaszke Do you plan to review this or should I find someone else?

@ssnl ssnl force-pushed the psutil_hi_pri branch from 66a8005 to 90e9de3 Compare May 6, 2019 16:17
@ssnl
Copy link
Collaborator Author

ssnl commented May 6, 2019

@ezyang I separated the test_proper_exit printing part to #20166 . That should be merge-able.

Copy link
Contributor

@apaszke apaszke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, but here's an idea: instead of guarding every single place where an error might be raised inside the worker function, wrap it in another one and have a catch-all for any errors that might get thrown. The code used to transmit exceptions to the master process can get isolated and called from both places to avoid duplication.

@ssnl
Copy link
Collaborator Author

ssnl commented May 13, 2019

@apaszke Thanks for the suggestion. I've given your proposal some thought. It is a nice idea, but for implementation we seem to have to try-catch in initialization or specialize the first iteration. I don't think it is worthwhile since we only need to cover this particular worker loop pattern. If in future we need to have another similar loop, we should definitely make this more general. :)

@ssnl
Copy link
Collaborator Author

ssnl commented May 13, 2019

@pytorchbot merge this please

@pytorchbot pytorchbot added the merge-this-please Was marked for merge with @pytorchbot merge this please label May 13, 2019
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ezyang is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@ezyang merged this pull request in f496ea3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-this-please Was marked for merge with @pytorchbot merge this please Merged module: dataloader Related to torch.utils.data.DataLoader and Sampler open source

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants