-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
TST: stats: add kstwo, ksone to slow tests. #12140
Conversation
This speeds up ``stats.test()`` by almost 50% (60 sec to 31 sec) when running locally. The `kstwo` test is also the single slowest test on CI, see scipygh-12132. Output before this commit: ``` ========================================================= slowest 40 test durations ========================================================= 17.48s call tests/test_continuous_basic.py::test_cont_basic[kstwo-arg59] 5.02s call tests/test_stats.py::TestMGCStat::test_random_state 3.46s call tests/test_stats.py::TestMGCStat::test_workers 3.17s call tests/test_continuous_basic.py::test_cont_basic[ksone-arg58] 1.84s call tests/test_stats.py::TestKSTwoSamples::testMediumBoth 1.71s call tests/test_stats.py::TestKSTwoSamples::testMiddlingBoth 1.34s call tests/test_continuous_basic.py::test_cont_basic[norminvgauss-arg78] 1.23s call tests/test_mstats_basic.py::TestCorr::test_kendalltau 1.03s call tests/test_stats.py::TestKSTwoSamples::test_some_code_paths 0.79s call tests/test_continuous_basic.py::test_cont_basic[ncx2-arg76] 0.72s call tests/test_continuous_basic.py::test_cont_basic[geninvgauss-arg35] 0.59s call tests/test_continuous_basic.py::test_cont_basic[skewnorm-arg90] 0.50s call tests/test_continuous_basic.py::test_cont_basic[burr-arg7] 0.47s call tests/test_continuous_basic.py::test_cont_basic[exponweib-arg20] 0.42s call tests/test_continuous_basic.py::test_cont_basic[tukeylambda-arg97] 0.36s call tests/test_continuous_basic.py::test_cont_basic[pearson3-arg80] 0.33s call tests/test_mstats_basic.py::TestCompareWithStats::test_kendalltau 0.33s call tests/test_continuous_basic.py::test_cont_basic[johnsonsb-arg51] 0.31s call tests/test_continuous_basic.py::test_cont_basic[powernorm-arg83] 0.29s call tests/test_continuous_basic.py::test_cont_basic[exponpow-arg19] 0.29s call tests/test_continuous_basic.py::test_cont_basic[crystalball-arg13] 0.27s call tests/test_continuous_basic.py::test_cont_basic[beta-arg4] 0.27s call tests/test_continuous_basic.py::test_cont_basic[triang-arg93] 0.26s call tests/test_continuous_basic.py::test_cont_basic[exponnorm-arg18] 0.26s call tests/test_continuous_basic.py::test_cont_basic[fatiguelife-arg22] 0.25s call tests/test_continuous_basic.py::test_cont_basic[burr12-arg8] 0.25s call tests/test_continuous_basic.py::test_cont_basic[gengamma-arg33] 0.25s call tests/test_continuous_basic.py::test_cont_basic[betaprime-arg5] 0.23s call tests/test_continuous_basic.py::test_cont_basic[halfgennorm-arg38] 0.22s call tests/test_continuous_basic.py::test_cont_basic[genhalflogistic-arg34] 0.22s call tests/test_continuous_basic.py::test_cont_basic[f-arg21] 0.19s call tests/test_stats.py::TestFOneWay::test_nist 0.19s call tests/test_continuous_basic.py::test_cont_basic[chi-arg10] 0.19s call tests/test_continuous_basic.py::test_cont_basic[invgauss-arg49] 0.19s call tests/test_continuous_basic.py::test_cont_basic[nct-arg75] 0.18s call tests/test_continuous_basic.py::test_cont_basic[genpareto-arg39] 0.18s call tests/test_multivariate.py::TestMultivariateNormal::test_broadcasting 0.18s call tests/test_distributions.py::TestLevyStable::test_pdf_alpha_equals_one_beta_non_zero 0.16s call tests/test_distributions.py::TestSkewNorm::test_moments 0.16s call tests/test_continuous_basic.py::test_cont_basic[gompertz-arg41] ```
@pvanmulbregt I think some of these performance regressions for |
|
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.
Seems like a useful gain in speed to me
Thanks @pvanmulbregt. I figured it was something like that. Thanks for the approval @larsoner . Merging then. |
This speeds up
stats.test()
by almost 50% (60 sec to 31 sec)when running locally. The
kstwo
test is also the single slowest teston CI, see gh-12132.
Output before this commit:
I'm leaving
TestMGCStat::test_workers
as the only test that takes >1.5 sec, to not make test coverage forMGC
too low.