-
Notifications
You must be signed in to change notification settings - Fork 527
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
[REVIEW] Reorganize Pytest Config and Add Quick Run Option #3137
[REVIEW] Reorganize Pytest Config and Add Quick Run Option #3137
Conversation
Please update the changelog in order to start CI tests. View the gpuCI docs here. |
Codecov Report
@@ Coverage Diff @@
## branch-0.17 #3137 +/- ##
===============================================
- Coverage 70.57% 70.50% -0.07%
===============================================
Files 197 196 -1
Lines 15461 15442 -19
===============================================
- Hits 10911 10887 -24
- Misses 4550 4555 +5
Continue to review full report at Codecov.
|
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.
Looks great... one Python style thing would be to remember to omit parens around simple condition. Otherwise seems very clear. I only have small questions and style asks - can approve quickly, though I'd like to get a few more eyes on it since it changes tests a bit.
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.
Just a super quick look with 2 comments from my part
This PR partially addresses #3093 by reorganizing the
conftest.py
files and adding a new plugins folder with a Quick Run plugin.Reorganizing like this has the added benefits:
./python
folderpython/cuml/test
folder and tried to use--run_stress
it would generate an errorcuml
in developer mode. PyTest will find the local tests automatically.Additionally, I have included the "Quick Run" plugin which significantly reduces the number of tests run. This is a good option when running locally where you want to hit most tests, but not do every permutation. Below is the help section:
Quick Run Plugin: --quick_run Selecting this option will reduce the number of tests run by only picking tests if one of the parameters has never been seen before.
And when running with the current
branch-0.17
it significantly reduces the number of tests:$ pytest --co --quick_run --disable-warnings python ======================================================================================================================================== test session starts ======================================================================================================================================== platform linux -- Python 3.8.6, pytest-6.1.2, py-1.9.0, pluggy-0.13.1 benchmark: 3.2.3 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000) rootdir: /home/mdemoret/Repos/rapids/cuml-dev2/python, configfile: pytest.ini plugins: profiling-1.7.0, hypothesis-5.41.0, benchmark-3.2.3, asyncio-0.14.0, timeout-1.4.2, cov-2.10.1 collected 36066 items / 33828 deselected / 2238 selected
Currently this results in a 75% reduction in runtime while only reducing the code coverage by 0.9%