scikit-learn-intelex
scikit-learn-intelex copied to clipboard
[enhancement] block use of sklearn_check_version in `onedal/`
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
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.
/intelci: run
/intelci: run
/intelci: run
/intelci: run
/intelci: run
/intelci: run