-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Update examples - use DataModule #4740
Conversation
Hello @Borda! Thanks for updating this PR. There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-11-20 15:25:50 UTC |
Codecov Report
@@ Coverage Diff @@
## master #4740 +/- ##
======================================
Coverage 93% 93%
======================================
Files 117 117
Lines 8967 8972 +5
======================================
+ Hits 8335 8345 +10
+ Misses 632 627 -5 |
pl_examples/__init__.py
Outdated
|
||
EXAMPLES_ROOT = os.path.dirname(__file__) | ||
PACKAGE_ROOT = os.path.dirname(EXAMPLES_ROOT) | ||
DATASETS_PATH = os.path.join(PACKAGE_ROOT, 'Datasets') |
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.
maybe "datasets" lowercase?
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.
mean the first or second one?
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.
Great PR ! Let's use _module_available
for all third party libraries.
Would you mind adding a test for _module_available
too ?
it is already tested by its example - doctest |
25151f1
to
80fa64d
Compare
from nvidia.dali.pipeline import Pipeline | ||
from nvidia.dali.plugin.pytorch import DALIClassificationIterator | ||
except (ImportError, ModuleNotFoundError): | ||
else: | ||
warn('NVIDIA DALI is not available') |
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 guess this isn't related to this PR, but shouldn't this be a hard crash if DALI isn't available?
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.
what do you mean?
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.
ok, the case is that with tests running on CPU where we do not install DALI the testing will fail just because of this raising error, an alternative would be to return from this script if DALI is missing without crashing...
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.
LGTM 🚀
* rename * add mnist_datamodule.py * dm * fix * imports * clean * imports * transforms * skip
What does this PR do?
partial update for #4694
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In in short, see following bullet-list:
Did you have fun?
Make sure you had fun coding 🙃