Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

[bugfix] show_fix should set num_workers to 0 #226

Merged
merged 2 commits into from
Apr 19, 2021
Merged

Conversation

tchaton
Copy link
Contributor

@tchaton tchaton commented Apr 19, 2021

What does this PR do?

Fixes # (issue)

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests? [not needed for typos/docs]
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

  • Is this pull request ready for review? (if not, please submit in draft mode)

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@tchaton tchaton self-assigned this Apr 19, 2021
@tchaton tchaton added this to the 0.3 milestone Apr 19, 2021
@codecov
Copy link

codecov bot commented Apr 19, 2021

Codecov Report

❗ No coverage uploaded for pull request base (master@a756e8b). Click here to learn what that means.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #226   +/-   ##
=========================================
  Coverage          ?   86.61%           
=========================================
  Files             ?       57           
  Lines             ?     2750           
  Branches          ?        0           
=========================================
  Hits              ?     2382           
  Misses            ?      368           
  Partials          ?        0           
Flag Coverage Δ
unittests 86.61% <100.00%> (?)

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

Impacted Files Coverage Δ
flash/vision/classification/data.py 87.80% <ø> (ø)
flash/data/data_module.py 78.09% <100.00%> (ø)

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 a756e8b...dec2e16. Read the comment docs.

Copy link
Collaborator

@ethanwharris ethanwharris left a comment

Choose a reason for hiding this comment

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

LGTM 😃 small nits

.gitignore Show resolved Hide resolved
flash/data/data_module.py Outdated Show resolved Hide resolved
tests/data/test_callbacks.py Outdated Show resolved Hide resolved
flash/data/data_module.py Show resolved Hide resolved
iterator = datamodule._reset_iterator(RunningStage.TRAINING)
assert isinstance(iterator, torch.utils.data.dataloader._SingleProcessDataLoaderIter)
iterator = iter(datamodule.train_dataloader())
assert isinstance(iterator, torch.utils.data.dataloader._MultiProcessingDataLoaderIter)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd add a small assert checking that internally the number of workers has been been kept as expected

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's what _MultiProcessingDataLoaderIter does.

@tchaton tchaton merged commit 42cc20a into master Apr 19, 2021
@tchaton tchaton deleted the num_workers_0 branch April 19, 2021 13:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants