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] fix side effects in check_estimator utility #2597

Merged
merged 2 commits into from May 2, 2022

Conversation

fkiraly
Copy link
Collaborator

@fkiraly fkiraly commented May 1, 2022

The check_estimator utility can test estimator instances, which is useful to test specific hyper-parameter settings.

Unfortunately, this had side effects on the passed estimator - which was used in testing throughout - and would break if the estimator was already fitted.

This PR fixes that issue by passing a clone and not the reference to the testing framework, in run_tests.

@fkiraly fkiraly added the module:tests test framework functionality - only framework, excl specific tests label May 1, 2022
@fkiraly fkiraly merged commit 7f43138 into main May 2, 2022
@fkiraly fkiraly deleted the check_estimator-reset branch May 2, 2022 10:09
@lmmentel lmmentel added the maintenance Continuous integration, unit testing & package distribution label May 13, 2022
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

3 participants