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

[enhancement] block use of sklearn_check_version in `onedal/`

Open icfaust opened this issue 9 months ago • 5 comments

Description

Add a design rule which forces all sklearn-related interfacing to occur in its proper package, namely sklearnex. This prevents bad estimator architectures which place too much of the sklearn-related aspects in the wrong area. This test crawls through the onedal folder and greps for "sklearn_check_version". Ideally this test would have no exceptions going forward. This adds the onedal/tests/test_common.py file, which will likely be expanded in the future with more onedal folder design checks.

Tasks -

  • [x] Initial compile
  • [x] correct public CI failures
  • [x] Split into separate PRs as necessary (and merge them)
  • [ ] pass private CI

icfaust avatar May 08 '24 12:05 icfaust

Maybe it make sense just ban or monitor this during review?

Refactoring is needed for:

https://github.com/intel/scikit-learn-intelex/blob/ea79e8f212e3a9431277023e2d54d5dc8e629abc/onedal/svm/svm.py#L25

https://github.com/intel/scikit-learn-intelex/blob/ea79e8f212e3a9431277023e2d54d5dc8e629abc/onedal/ensemble/forest.py#L27

This is meant to reduce review burden and reduce inconsistency in review (which the failures show). We also don't have a design document with rules. I guess we could have a discussion of how to do rule enforcement in sklearnex.

icfaust avatar May 08 '24 12:05 icfaust

/intelci: run

icfaust avatar May 14 '24 10:05 icfaust

/intelci: run

icfaust avatar May 14 '24 10:05 icfaust

/intelci: run

icfaust avatar May 14 '24 19:05 icfaust

/intelci: run

icfaust avatar May 15 '24 18:05 icfaust

/intelci: run

icfaust avatar May 21 '24 07:05 icfaust

/intelci: run

icfaust avatar May 22 '24 20:05 icfaust