-
Notifications
You must be signed in to change notification settings - Fork 26.3k
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
Test XLA examples #5583
Test XLA examples #5583
Conversation
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.
Love this!
.circleci/config.yml
Outdated
@@ -73,7 +73,7 @@ jobs: | |||
- checkout | |||
- run: sudo pip install .[sklearn,torch,testing] | |||
- run: sudo pip install -r examples/requirements.txt | |||
- run: python -m pytest -n 8 --dist=loadfile -s ./examples/ | tee output.txt | |||
- run: python -m pytest -n 8 --dist=loadfile -s ./examples/ --ignore=examples/test_xla_examples.py | tee output.txt |
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.
you could also make a require_xla
decorator.
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.
Very good idea!
# Assert that the model trains | ||
self.assertGreaterEqual(value, 0.70) | ||
|
||
# Assert that the script takes less than 100 seconds to make sure it doesn't hang. |
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.
(nit) You can do this with pytimeout
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.
Nice, will do!
Codecov Report
@@ Coverage Diff @@
## master #5583 +/- ##
==========================================
+ Coverage 76.31% 77.83% +1.52%
==========================================
Files 145 145
Lines 25049 25053 +4
==========================================
+ Hits 19116 19500 +384
+ Misses 5933 5553 -380
Continue to review full report at Codecov.
|
Add a script to test examples on XLA.