Skip to content
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

[MNT] Move dependency checkers to separate module in utils #6354

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

fkiraly
Copy link
Collaborator

@fkiraly fkiraly commented Apr 28, 2024

This PR moves dependency checkers to a separate module in util, to improve test collection time and minimize import coupling. See #6344.

This has a noticeable effect on test collection times, since importing the dependency checkers from utils leads to an import chain that touches numpy and pandas, due to them being a subfolder of validation.

Moving the _dependencies module out of validation prevents the imports at test collection time.

Locally, the time for py-spy record -o profile_classification.svg -- python -m pytest sktime/classification -n0 --collect-only goes down from 2 minutes to about 1.

This is still longer than the 20sec reported for all tests overall in #4900, but might be a step.

@fkiraly fkiraly added maintenance Continuous integration, unit testing & package distribution module:tests test framework functionality - only framework, excl specific tests labels Apr 28, 2024
@fkiraly fkiraly changed the title [MNT] Move dependency checkers to separate module in util [MNT] Move dependency checkers to separate module in utils Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Continuous integration, unit testing & package distribution module:tests test framework functionality - only framework, excl specific tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant