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

[ENH] performance optimization for _check_soft_dependencies, speed up test collection time #6355

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

fkiraly
Copy link
Collaborator

@fkiraly fkiraly commented Apr 28, 2024

This PR optimizes the runtime of _check_soft_dependencies, speeding up test collection time, towards #6344.

The speed-up comes from using importlib find_spec instead of actually attempting an import and catching the exception.

The "suppress std out" argument becomes obsolete, as no output is generated when not importing the module.

This PR also fixes an unreported bug in the sktime code base, where the package (PEP 440) scikit-learn was referred to as sklearn.

@fkiraly fkiraly added module:tests test framework functionality - only framework, excl specific tests enhancement Adding new functionality labels Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding new functionality 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