-
Notifications
You must be signed in to change notification settings - Fork 183
Add the ability to reset hyperparameters #2561
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
/intelci: run |
@Vika-F Failure looks legit:
It appears that something might have assumed that it was running with different parameters and needs its tolerance adjusted. Either that, or the parameters when it reaches that test might not have been reset. |
|
||
# Reset hyperparameters to the default values | ||
if daal_check_version((2025, "P", 700)): | ||
PCA.reset_hyperparameters("fit") |
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.
To ensure this is called, better to put it into a fixture cleanup function:
https://docs.pytest.org/en/6.2.x/fixture.html#teardown-cleanup-aka-fixture-finalization
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.
Like in this PR for example: #2568
But we do not use any hyperparameters with SVD solver. I.e. the changes should not affect this test case at all. |
I think there's some logic that modifies the solver for older version of sklearn:
Does this bug happen in others PRs? If not, perhaps one thing to do would be to verify which solver from oneDAL is being called in those failing environments. |
@Vika-F The bug doesn't appear to affect other recent PRs, so probably something here is having an effect. |
I'm now seeing the same error in a different PR: So probably not caused by the changes here, but odd that it happens only sporadically. |
That's a curious error in the CI:
It looks like the error is what was expected, just with a different message. Is sklearnex perhaps copy-pastying an outdated error message from sklearn? |
Description
Static
reset_hyperparameters(op)
method that resets the hyperparameters of the algorithm to the default settings was added to the estimators that have hyperparameters.PR should start as a draft, then move to ready for review state after CI is passed and all applicable checkboxes are closed.
This approach ensures that reviewers don't spend extra time asking for regular requirements.
You can remove a checkbox as not applicable only if it doesn't relate to this PR in any way.
For example, PR with docs update doesn't require checkboxes for performance while PR with any change in actual code should have checkboxes and justify how this code change is expected to affect performance (or justification should be self-evident).
Checklist to comply with before moving PR from draft:
PR completeness and readability
Testing
Performance
not applicable