-
Notifications
You must be signed in to change notification settings - Fork 30
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
Multithreading issue with TensorFlow and PyTorch dataloader #44
Merged
Conversation
This file contains 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
Get latest
This way we can do any distribution till total samples are more than commsize*read_threads*batchsize
hariharan-devarajan
force-pushed
the
main
branch
2 times, most recently
from
March 10, 2023 09:29
d31593c
to
6b655aa
Compare
hariharan-devarajan
changed the title
Multithreading issue with TF and PyT data loader
Multithreading issue with TensorFlow and PyTorch dataloader
Mar 10, 2023
For torch, if we do not init the worker, then only one thread is used to do I/O. Now we fixed that
hariharan-devarajan
force-pushed
the
main
branch
2 times, most recently
from
March 10, 2023 11:33
05dbf87
to
66f5d5e
Compare
hariharan-devarajan
force-pushed
the
main
branch
from
March 10, 2023 11:42
66f5d5e
to
8fc40ce
Compare
replace glob with pathlib as it is not able to see recent files.
# Conflicts: # src/utils/config.py
zhenghh04
reviewed
Mar 17, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll merge this PR with some changes. Still need to think about the flie map to different threads
Comment on lines
69
to
73
self.output_folder = self.args.output_folder | ||
self.logfile = os.path.join(self.output_folder, self.args.log_file) | ||
self.data_folder = self.args.data_folder | ||
os.makedirs(self.output_folder, exist_ok=True) | ||
self.storage_root = self.args.storage_root |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved this after line 81
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.
For both data loaders, multi-threading needed more implementation.