koaning / scikit-lego

Extra blocks for scikit-learn pipelines.
https://koaning.github.io/scikit-lego/
MIT License
1.28k stars 117 forks source link

WIP: unittests speedup #604

Closed FBruzzesi closed 11 months ago

FBruzzesi commented 11 months ago

Description

I was playing around for some features and while iterating I was getting bored of waiting for tests. Thus running pytest . --durations 30 --disable-warnings I could get the most time consuming tests.

The code changes keep the same level of coverage but lower the runtime.

I opened a PR in my own fork to quantify the difference and it is quite nice (4m 14s vs last merge here of 7m 37s).

I didn't investigate much further, but since it was a bit relevant for me I wanted to share it.

FBruzzesi commented 11 months ago

Love to hear that! To be fair, the best improvement comes from not generating the splits in the grouped time series cv, but running its "raising warning" method as standalone