-
-
Notifications
You must be signed in to change notification settings - Fork 270
Fix/sklearn test compatibility #1340
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
37cd702
Update 'sparse' parameter for OHE for sklearn >= 1.4
PGijsbers 2343203
Add compatability or skips for sklearn >= 1.4
PGijsbers 667529e
Change 'auto' to 'sqrt' for sklearn>1.3 as 'auto' is deprecated
PGijsbers 7b088c4
Skip flaky test
PGijsbers 875a05a
Fix typo
PGijsbers 87cf0b3
Ignore description comparison for newer scikit-learn
PGijsbers 7b826e0
Adjust for scikit-learn 1.3
PGijsbers 280a972
Remove timeout and reruns to better investigate CI failures
PGijsbers 72a8765
Fix typo in parametername
PGijsbers 363724a
Add jobs for more recent scikit-learns
PGijsbers d664a34
Expand the matrix with all scikit-learn 1.x versions
PGijsbers 9af2f62
Fix for numpy2.0 compatibility (#1341)
PGijsbers 5d1da88
Rewrite matrix and update numpy compatibility
PGijsbers 9bd7b2f
Move comment in-line
PGijsbers 7ce5b89
Stringify name of new step to see if that prevented the action
PGijsbers 91f6dee
Fix unspecified os for included jobs
PGijsbers 670a76b
Fix typo in version pinning for numpy
PGijsbers 412a193
Fix version specification for sklearn skips
PGijsbers 35206bb
Output final list of installed packages for debugging purposes
PGijsbers f19897e
Cap scipy version for older versions of scikit-learn
PGijsbers dd11f5d
Update parameter base_estimator to estimator for sklearn>=1.4
PGijsbers 9372054
Account for changes to sklearn interface in 1.4 and 1.5
PGijsbers 72a2fb1
Non-strict reinstantiation requires different scikit-learn version
PGijsbers 6830681
Parameters were already changed in 1.4
PGijsbers 369f5c0
Fix race condition (I think)
PGijsbers a2e7022
Use latest patch version of each minor release
PGijsbers 828a7a4
Convert numpy types back to builtin types
PGijsbers e98019c
Specify versions with * instead to allow for specific patches
PGijsbers c7f93c8
Flow_exists does not return None but False is the flow does not exist
PGijsbers 68481cf
Update new version definitions also installation step
PGijsbers a6b5ddd
Fix bug introduced in refactoring for np.generic support
PGijsbers 9e8217f
Add back the single-test timeout of 600s
PGijsbers eda2b23
[skip ci] Add note to changelog
PGijsbers 6d0cb41
Check that evaluations are present with None-check instead
PGijsbers 2c161e4
Remove timeouts again
PGijsbers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Rewrite matrix and update numpy compatibility
- Loading branch information
commit 5d1da88c4de3d2c1b23ab7df461f4db8d7b5d937
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,61 +25,43 @@ jobs: | |
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.8"] | ||
| # TODO(eddiebergman): We should consider testing against newer version I guess... | ||
| # We probably consider just having a `"1"` version to always test against latest | ||
| scikit-learn: ["0.23.1", "0.24"] | ||
| python-version: ["3.9"] | ||
| scikit-learn: ["1.0", "1.1", "1.2", "1.3", "1.4", "1.5"] | ||
| os: [ubuntu-latest] | ||
| sklearn-only: ["true"] | ||
| exclude: # no scikit-learn 0.23 release for Python 3.9 | ||
| - python-version: "3.9" | ||
| scikit-learn: "0.23.1" | ||
| include: | ||
| - os: ubuntu-latest | ||
| python-version: "3.9" | ||
| scikit-learn: "1.5" | ||
| sklearn-only: "true" | ||
| - os: ubuntu-latest | ||
| python-version: "3.9" | ||
| scikit-learn: "1.4" | ||
| sklearn-only: "true" | ||
| - os: ubuntu-latest | ||
| python-version: "3.9" | ||
| scikit-learn: "1.3" | ||
| sklearn-only: "true" | ||
| - os: ubuntu-latest | ||
| python-version: "3.9" | ||
| scikit-learn: "1.1" | ||
| sklearn-only: "true" | ||
| - os: ubuntu-latest | ||
| python-version: "3.9" | ||
| scikit-learn: "1.0" | ||
| # no scikit-learn 0.23 release for Python 3.9 | ||
| - python-version: "3.8" | ||
| scikit-learn: "0.23.1" | ||
| sklearn-only: "true" | ||
| # scikit-learn 0.24 relies on scipy defaults, so we need to fix the version | ||
| # c.f. https://github.com/openml/openml-python/pull/1267 | ||
| - os: ubuntu-latest | ||
| python-version: "3.9" | ||
| scikit-learn: "0.24" | ||
| scipy: "1.10.0" | ||
| sklearn-only: "true" | ||
| # Do a Windows and Ubuntu test for _all_ openml functionality | ||
| # I am not sure why these are on 3.8 and older scikit-learn | ||
| - os: windows-latest | ||
| python-version: "3.8" | ||
| scikit-learn: 0.24.* | ||
| scipy: "1.10.0" | ||
| sklearn-only: 'false' | ||
| # Include a code cov version | ||
| - code-cov: true | ||
| os: ubuntu-latest | ||
| python-version: "3.8" | ||
| scikit-learn: 0.23.1 | ||
| sklearn-only: 'false' | ||
| # Include a windows test, for some reason on a later version of scikit-learn | ||
| - os: windows-latest | ||
| python-version: "3.8" | ||
| scikit-learn: 0.24.* | ||
| scipy: "1.10.0" # not sure why the explicit scipy version? | ||
| sklearn-only: 'false' | ||
| fail-fast: false | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 2 | ||
| - name: Setup Python ${{ matrix.python-version }} | ||
| if: matrix.os != 'windows-latest' # windows-latest only uses preinstalled Python (3.7.9) | ||
| if: matrix.os != 'windows-latest' # windows-latest only uses preinstalled Python (3.9.13) | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
@@ -92,9 +74,13 @@ jobs: | |
| pip install scikit-learn==${{ matrix.scikit-learn }} | ||
| - name: Install numpy for Python 3.8 | ||
| # Python 3.8 & scikit-learn<0.24 requires numpy<=1.23.5 | ||
| if: ${{ matrix.python-version == '3.8' && contains(fromJSON('["0.23.1", "0.22.2", "0.21.2"]'), matrix.scikit-learn) }} | ||
| if: ${{ matrix.python-version == '3.8' && matrix.scikit-learn == '0.23.1' }} | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. older versions were (no longer) included in the run matrix anyway. |
||
| run: | | ||
| pip install numpy==1.23.5 | ||
| - name: Install NumPy 1.x for scikit-learn < 1.4 | ||
| if: ${{ contains(fromJSON('["1.0", "1.1", "1.2", "1.3"]'), matrix.scikit-learn) }} | ||
| run: | | ||
| pip install numpy<=2.0 | ||
| - name: Install scipy ${{ matrix.scipy }} | ||
| if: ${{ matrix.scipy }} | ||
| run: | | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I rewrote the matrix to be effectively the same, but also testing each 1.x release.
The only difference is that the default is now 3.9, since that is supported for all scikit-learn versions (except 0.23) so it makes things easier.