scikit-learn-intelex icon indicating copy to clipboard operation
scikit-learn-intelex copied to clipboard

MAINT: Don't make inapplicable conditions block oneDAL usage in LogisticRegression

Open david-cortes-intel opened this issue 7 months ago • 2 comments

Description

This PR modifies the checks for whether oneDAL will be supported for logistic regression so as not to block its usage in the following scenarios:

  • Passing multi_class strategy argument when the data is binary (argument is ignored).
  • Passing an l1 ratio of zero instead of not changing it from the default (it means 'don't apply L1 regularization').

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

  • [x] I have reviewed my changes thoroughly before submitting this pull request.
  • [x] Git commit message contains an appropriate signed-off-by string (see CONTRIBUTING.md for details).
  • [x] I have added a respective label(s) to PR if I have a permission for that.
  • [x] I have resolved any merge conflicts that might occur with the base branch.

Testing

  • [x] I have run it locally and tested the changes extensively.
  • [x] All CI jobs are green or I have provided justification why they aren't.

david-cortes-intel avatar Jun 06 '25 06:06 david-cortes-intel

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Flag Coverage Δ
azure ?
github 73.58% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
sklearnex/linear_model/logistic_regression.py 70.54% <ø> (ø)

... and 37 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Jun 06 '25 06:06 codecov[bot]

Should be a quick PR to approve, should wait until private CI is back. Could you add info in the description about the change in warm_start too?

Edit: wrong about warm start, please disregard

icfaust avatar Jun 06 '25 10:06 icfaust

/intelci: run

david-cortes-intel avatar Jun 23 '25 07:06 david-cortes-intel

/intelci: run

david-cortes-intel avatar Jun 23 '25 10:06 david-cortes-intel