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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pytorch timeout=30 #1520

Merged
merged 3 commits into from
Mar 7, 2022
Merged

Pytorch timeout=30 #1520

merged 3 commits into from
Mar 7, 2022

Conversation

farizrahman4u
Copy link
Contributor

馃殌 馃殌 Pull Request

Checklist:

  • My code follows the style guidelines of this project and the Contributing document
  • I have commented my code, particularly in hard-to-understand areas
  • I have kept the coverage-rate up
  • I have performed a self-review of my own code and resolved any problems
  • I have checked to ensure there aren't any other open Pull Requests for the same change
  • I have described and made corresponding changes to the relevant documentation
  • New and existing unit tests pass locally with my changes

Changes

Set pytorch dataloader timeout to 30 sec.

@@ -244,7 +245,7 @@ def __iter__(self):

while any(self.active_workers):
try:
wid, data = self.data_queue.get(timeout=5)
wid, data = self.data_queue.get(timeout=PYTORCH_DATALOADER_TIMEOUT)
Copy link
Contributor

Choose a reason for hiding this comment

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

can we make this an argument that the user passes and default to this value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think ideally there should be no timeout and the workers should be able to report exceptions to the main thread.. so better not change API right now.

@codecov
Copy link

codecov bot commented Mar 3, 2022

Codecov Report

Merging #1520 (844eb04) into main (6ef9381) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1520      +/-   ##
==========================================
- Coverage   92.35%   92.31%   -0.04%     
==========================================
  Files         189      189              
  Lines       16453    16455       +2     
==========================================
- Hits        15195    15191       -4     
- Misses       1258     1264       +6     
Flag Coverage 螖
unittests 92.31% <100.00%> (-0.04%) 猬囷笍

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage 螖
hub/constants.py 100.00% <100.00%> (酶)
hub/integrations/pytorch/dataset.py 91.37% <100.00%> (-1.55%) 猬囷笍
hub/integrations/tests/test_pytorch_dataloader.py 95.69% <0.00%> (-2.16%) 猬囷笍

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update 6ef9381...844eb04. Read the comment docs.

@farizrahman4u farizrahman4u merged commit 1734852 into main Mar 7, 2022
@farizrahman4u farizrahman4u deleted the fr_pt_timeout branch March 7, 2022 17:15
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

Successfully merging this pull request may close these issues.

None yet

4 participants