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

Logistic Regression CI fix #2013

Merged
merged 3 commits into from
Aug 27, 2024

Conversation

md-shafiul-alam
Copy link
Contributor

@md-shafiul-alam md-shafiul-alam commented Aug 26, 2024

Description

test_csr fails for logistic regression in Nightly, increasing tolerance.


Checklist to comply with before moving PR from draft:

PR completeness and readability

  • I have reviewed my changes thoroughly before submitting this pull request.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes or created a separate PR with update and provided its number in the description, if necessary.
  • 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

  • The unit tests pass successfully.
  • I have run it locally and tested the changes extensively.

Performance

  • I have measured performance for affected algorithms using scikit-learn_bench and provided at least summary table with measured data, if performance change is expected.
  • I have provided justification why performance has changed or why changes are not expected.

Sorry, something went wrong.

@md-shafiul-alam md-shafiul-alam added the testing Tests for sklearnex/daal4py/onedal4py & patching sklearn label Aug 26, 2024
@md-shafiul-alam
Copy link
Contributor Author

/intelci: run

@@ -129,5 +129,5 @@ def test_csr(queue, dtype, dims):

assert_allclose(pred, pred_sp)
assert_allclose(prob, prob_sp)
assert_allclose(model.coef_, model_sp.coef_)
assert_allclose(model.intercept_, model_sp.intercept_)
assert_allclose(model.coef_, model_sp.coef_, atol=1e-6)
Copy link
Contributor

Choose a reason for hiding this comment

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

you can increase tolerance up to 1e-5 to avoid sporadic failures

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed, or even 1e-4. I see in the nightly that max relative difference was 7.3e-5

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe rtol is a better metric since its independent of data

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@md-shafiul-alam
Copy link
Contributor Author

/intelci: run

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.

1e-4 relative tolerance is a bit eye opening (or ~7e-5). I am going to approve it with the understanding that a follow up ticket for an investigation is made.

@md-shafiul-alam md-shafiul-alam merged commit d7a2f92 into uxlfoundation:main Aug 27, 2024
18 checks passed
@avolkov-intel
Copy link
Contributor

@Mergifyio copy rls/2024.7.0-rls

Copy link

mergify bot commented Aug 28, 2024

copy rls/2024.7.0-rls

✅ Pull request copies have been created

mergify bot pushed a commit that referenced this pull request Aug 28, 2024
* increase tolerance

* increase tolerance

* increase tolerance

(cherry picked from commit d7a2f92)
@mergify mergify bot mentioned this pull request Aug 28, 2024
10 tasks
Alexsandruss pushed a commit that referenced this pull request Aug 28, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
* increase tolerance

* increase tolerance

* increase tolerance

(cherry picked from commit d7a2f92)

Co-authored-by: msa <111298646+md-shafiul-alam@users.noreply.github.com>
md-shafiul-alam added a commit to md-shafiul-alam/scikit-learn-intelex that referenced this pull request Aug 29, 2024
* increase tolerance

* increase tolerance

* increase tolerance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Tests for sklearnex/daal4py/onedal4py & patching sklearn
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants