Skip to content

MAINT: Remove unused arguments to LogisticRegression SPMD #2523

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

Conversation

david-cortes-intel
Copy link
Contributor

@david-cortes-intel david-cortes-intel commented Jun 10, 2025

Description

This PR removes unused arguments to the SPMD version of logistic regression, as it ignores some of them.


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

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

Testing

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

Copy link

codecov bot commented Jun 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

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

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

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

... and 37 files with indirect coverage changes

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

@david-cortes-intel
Copy link
Contributor Author

/intelci: run

1 similar comment
@david-cortes-intel
Copy link
Contributor Author

/intelci: run

@david-cortes-intel
Copy link
Contributor Author

/intelci: run

1 similar comment
@david-cortes-intel
Copy link
Contributor Author

/intelci: run

@david-cortes-intel david-cortes-intel changed the title [Experiment, do NOT merge] Try removing unused arguments to LogisticRegression MAINT: Removing unused arguments to LogisticRegression Jun 30, 2025
@david-cortes-intel
Copy link
Contributor Author

Failures do not seem to be blamable on this PR.

@david-cortes-intel david-cortes-intel marked this pull request as ready for review June 30, 2025 11:03
@david-cortes-intel david-cortes-intel changed the title MAINT: Removing unused arguments to LogisticRegression MAINT: Removeunused arguments to LogisticRegression SPMD Jun 30, 2025
@david-cortes-intel david-cortes-intel changed the title MAINT: Removeunused arguments to LogisticRegression SPMD MAINT: Remove unused arguments to LogisticRegression SPMD Jul 2, 2025
@avolkov-intel
Copy link
Contributor

I think we can hard-code method "dense_batch" in this line here https://github.com/uxlfoundation/scikit-learn-intelex/blob/main/onedal/linear_model/logistic_regression.py#L66 and avoid having this argument at all

@david-cortes-intel
Copy link
Contributor Author

I think we can hard-code method "dense_batch" in this line here https://github.com/uxlfoundation/scikit-learn-intelex/blob/main/onedal/linear_model/logistic_regression.py#L66 and avoid having this argument at all

Would it require removing the argument from some other function signature?

@avolkov-intel
Copy link
Contributor

I think we can hard-code method "dense_batch" in this line here https://github.com/uxlfoundation/scikit-learn-intelex/blob/main/onedal/linear_model/logistic_regression.py#L66 and avoid having this argument at all

Would it require removing the argument from some other function signature?

I'm pretty sure it only should be removed from class declaration in this file, it shouldn't be used in any other places

https://github.com/uxlfoundation/scikit-learn-intelex/blob/main/onedal/linear_model/logistic_regression.py

Copy link
Contributor

@icfaust icfaust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is impacting beyond spmd, it is impacting all onedal GPU use of logisticregression please reflect that in the title and description. As per the evolving design documents, these would be sklearn conformance additions, and are in the wrong module. Thanks for removing them.

@david-cortes-intel
Copy link
Contributor Author

This is impacting beyond spmd, it is impacting all onedal GPU use of logisticregression please reflect that in the title and description.

I don't follow. The non-SPMD GPU estimator from sklearnex would already check for conditions that wouldn't result in passing what's removed here. Only the SPMD estimator would allow calling it with all the arguments it offers that it then ignores.

As per the evolving design documents, these would be sklearn conformance additions, and are in the wrong module. Thanks for removing them.

Which design documents do you mean?

@david-cortes-intel
Copy link
Contributor Author

Looks like these arguments were actually needed for some reason for the non-SPMD GPU version to work, so not sure what would be the best way to remove them from SPMD instead of accepting but ignoring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants