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

[enhancement] make ```BasicStatistics``` and ```IncrementalBasicStatistics``` array_api-compliant

Open icfaust opened this issue 1 year ago • 7 comments

Description

Add a comprehensive description of proposed changes

List associated issue number(s) if exist(s): #6 (for example)

Documentation PR (if needed): #1340 (for example)

Benchmarks PR (if needed): https://github.com/IntelPython/scikit-learn_bench/pull/155 (for example)


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.
  • [ ] 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

  • [ ] I have run it locally and tested the changes extensively.
  • [ ] All CI jobs are green or I have provided justification why they aren't.
  • [ ] I have extended testing suite if new functionality was introduced in this PR.

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.
  • [ ] I have provided justification why quality metrics have changed or why changes are not expected.
  • [ ] I have extended benchmarking suite and provided corresponding scikit-learn_bench PR if new measurable functionality was introduced in this PR.

icfaust avatar Nov 26 '24 11:11 icfaust

/intelci: run

icfaust avatar Nov 28 '24 14:11 icfaust

/intelci: run

icfaust avatar Nov 28 '24 20:11 icfaust

/intelci: run

icfaust avatar Nov 29 '24 10:11 icfaust

/intelci: run

icfaust avatar Dec 01 '24 12:12 icfaust

/intelci: run

icfaust avatar Dec 01 '24 21:12 icfaust

/intelci: run

icfaust avatar Dec 03 '24 08:12 icfaust

/intelci: run

icfaust avatar Dec 04 '24 07:12 icfaust

Codecov Report

:x: Patch coverage is 97.56098% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
sklearnex/basic_statistics/basic_statistics.py 92.85% 0 Missing and 1 partial :warning:
...x/basic_statistics/incremental_basic_statistics.py 95.45% 0 Missing and 1 partial :warning:
Flag Coverage Δ
azure 80.88% <93.90%> (-0.07%) :arrow_down:
github 73.26% <97.56%> (-0.07%) :arrow_down:

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

Files with missing lines Coverage Δ
onedal/basic_statistics/basic_statistics.py 100.00% <100.00%> (+1.92%) :arrow_up:
...l/basic_statistics/incremental_basic_statistics.py 100.00% <100.00%> (+5.88%) :arrow_up:
onedal/cluster/kmeans.py 78.97% <100.00%> (ø)
sklearnex/basic_statistics/basic_statistics.py 88.88% <92.85%> (-0.97%) :arrow_down:
...x/basic_statistics/incremental_basic_statistics.py 96.77% <95.45%> (+0.73%) :arrow_up:
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Jul 08 '25 17:07 codecov[bot]

/intelci: run

icfaust avatar Jul 09 '25 00:07 icfaust

/intelci: run

icfaust avatar Jul 09 '25 07:07 icfaust

/intelci: run

icfaust avatar Jul 09 '25 14:07 icfaust

/intelci: run

icfaust avatar Jul 11 '25 13:07 icfaust

/intelci: run

icfaust avatar Jul 15 '25 09:07 icfaust

/intelci: run

icfaust avatar Jul 15 '25 11:07 icfaust

/intelci: run

icfaust avatar Jul 16 '25 06:07 icfaust

This needs an update: https://github.com/uxlfoundation/scikit-learn-intelex/blob/main/onedal/basic_statistics/tests/utils.py#L35 (or even a refactor)

ethanglaser avatar Jul 24 '25 00:07 ethanglaser

This needs an update: https://github.com/uxlfoundation/scikit-learn-intelex/blob/main/onedal/basic_statistics/tests/utils.py#L35 (or even a refactor)

Good point, in this case the dict is keyed not off the result but off the option, which doesn't have the trailing underscore (if there were problems, there would be test failures all over the place).

icfaust avatar Jul 25 '25 14:07 icfaust

This needs an update: https://github.com/uxlfoundation/scikit-learn-intelex/blob/main/onedal/basic_statistics/tests/utils.py#L35 (or even a refactor)

Good point, in this case the dict is keyed not off the result but off the option, which doesn't have the trailing underscore (if there were problems, there would be test failures all over the place).

spmd tests in private CI fail as a result of this

ethanglaser avatar Jul 25 '25 15:07 ethanglaser

This needs an update: https://github.com/uxlfoundation/scikit-learn-intelex/blob/main/onedal/basic_statistics/tests/utils.py#L35 (or even a refactor)

Good point, in this case the dict is keyed not off the result but off the option, which doesn't have the trailing underscore (if there were problems, there would be test failures all over the place).

spmd tests in private CI fail as a result of this

You are absolutely right, my bad. Made modifications for that to make it clear to future developers.

icfaust avatar Jul 26 '25 15:07 icfaust

/intelci: run

icfaust avatar Jul 26 '25 20:07 icfaust

/intelci: run

icfaust avatar Jul 26 '25 22:07 icfaust

/intelci: run

icfaust avatar Jul 28 '25 22:07 icfaust