Forward worker exceptions and exit with it#1003
Closed
priyaramani wants to merge 13 commits intomainfrom
Closed
Conversation
ejguan
reviewed
Feb 9, 2023
ejguan
reviewed
Feb 10, 2023
ejguan
reviewed
Feb 13, 2023
Contributor
ejguan
left a comment
There was a problem hiding this comment.
For lint error, can you please follow https://github.com/pytorch/data/blob/main/CONTRIBUTING.md#code-style to fix them automatically?
6 tasks
ejguan
approved these changes
Feb 15, 2023
Contributor
ejguan
left a comment
There was a problem hiding this comment.
You might want to rebase onto main branch again. I have already renamed PrototypeMultiProcessingReadingService to MultiProcessingReadingService
ejguan
reviewed
Feb 15, 2023
NivekT
reviewed
Feb 15, 2023
Contributor
NivekT
left a comment
There was a problem hiding this comment.
LGTM overall with some questions:
| dp = MakeMistakeDataPipe(dp) | ||
| for worker_prefetch_cnt in [0, 5, 10]: | ||
| for num_workers in [1, 4]: | ||
| rs = MultiProcessingReadingService(num_workers=num_workers, worker_prefetch_cnt=worker_prefetch_cnt) |
Contributor
There was a problem hiding this comment.
What happens if there is a DataPipe after Prefetcher? Does it still work properly?
e.g. dp.map().prefetch().map()
Contributor
|
@priyaramani has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Contributor
|
@priyaramani merged this pull request in b717187. |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a worker thread fails in PrototypeMultiProcessingReadingService, exception was silently neglected and the thread hanged. This PR fixes that by catching and propagating exception to response queue, showing that to user and exiting the process instead of hanging.