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

[ci] [python-package] [R-package] adapt to scikit-learn check_sample_weight_equivalence changes, stop testing against R 3.6 on Linux #6733

Merged
merged 5 commits into from
Nov 30, 2024

Conversation

jameslamb
Copy link
Collaborator

@jameslamb jameslamb commented Nov 29, 2024

More changes to estimator checks have been made in scikit-learn, and those broke CI here.

CI is failing like this when using the latest scikit-learn nightlies:

=========================== short test summary info ============================
FAILED tests/python_package_test/test_sklearn.py::test_sklearn_integration[LGBMClassifier()-check_sample_weight_equivalence_on_dense_data]
FAILED tests/python_package_test/test_sklearn.py::test_sklearn_integration[LGBMClassifier()-check_sample_weight_equivalence_on_sparse_data]
===== 2 failed, 767 passed, 40 skipped, 2 xfailed, 584 warnings in 36.86s ======

(build link)

Looks like scikit-learn/scikit-learn#30137 removed check_sample_weight_equivalence, in favor of 2 new functions names check_sample_weight_equivalence_on_{dense,sparse}_data. This updates lightgbm's xfail_checks tag to include all 3 names, so those tests are correctly xfail'd for the full range of scikit-learn versions lightgbm supports.

update: this also removes the R 3.6 Linux CI job to fix another blocking CI issue, see #6733 (comment)

@jameslamb jameslamb changed the title [python-package] adapt to more scikit-learn check_sample_weight_equivalence WIP: [python-package] adapt to more scikit-learn check_sample_weight_equivalence Nov 29, 2024
@jameslamb
Copy link
Collaborator Author

jameslamb commented Nov 29, 2024

Noticing that the R 3.6 CI job has been failing for a couple days like this:

Post job cleanup.
/usr/bin/docker exec 0f363447ec94ed26e9ae21b628f3850fe9f1e15a4c8a341b96fcdc540018e374 sh -c "cat /etc/*release | grep ^ID"
/__e/node20/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /__e/node20/bin/node)

(build link)

That's happening here:

- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 5
submodules: true

Will have to fix that in this PR too. I'll try that.

Related prior conversations:

@jameslamb jameslamb changed the title WIP: [python-package] adapt to more scikit-learn check_sample_weight_equivalence WIP: [python-package] adapt to scikit-learn check_sample_weight_equivalence changes Nov 29, 2024
@jameslamb jameslamb changed the title WIP: [python-package] adapt to scikit-learn check_sample_weight_equivalence changes WIP: [python-package] adapt to scikit-learn check_sample_weight_equivalence changes, stop testing against R 3.6 on Linux Nov 29, 2024
compiler: gcc
r_version: 3.6
build_type: cmake
container: 'ubuntu:18.04'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Trying to fix #6733 (comment), it seems that the workaround from actions/checkout#1590 (comment) is no longer working.

See actions/checkout#1590 (comment).

Between this and all the work that was required with package-pinning in #6718, I think we should just fully stop testing R 3.6 on Linux in CI here. As we did for macOS in #5859.

Note that we'll still have test coverage on Windows:

- os: windows-latest
task: r-package
compiler: MINGW
toolchain: MINGW
r_version: 3.6
build_type: cmake
container: null

# Visual Studio 2019
- os: windows-2019
task: r-package
compiler: MSVC
toolchain: MSVC
r_version: 3.6
build_type: cmake
container: null

Dropping this testing gets us the following:

@jameslamb jameslamb changed the title WIP: [python-package] adapt to scikit-learn check_sample_weight_equivalence changes, stop testing against R 3.6 on Linux [ci] [python-package] adapt to scikit-learn check_sample_weight_equivalence changes, stop testing against R 3.6 on Linux Nov 29, 2024
@jameslamb jameslamb marked this pull request as ready for review November 29, 2024 06:31
@StrikerRUS StrikerRUS changed the title [ci] [python-package] adapt to scikit-learn check_sample_weight_equivalence changes, stop testing against R 3.6 on Linux [ci] [python-package] [R-package] adapt to scikit-learn check_sample_weight_equivalence changes, stop testing against R 3.6 on Linux Nov 29, 2024
Copy link
Collaborator

@StrikerRUS StrikerRUS left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you very much for quick fix! Nice to see this simplification diff for R.

@jameslamb
Copy link
Collaborator Author

Thanks very much for the quick review! Merging this to unblock CI.

@jameslamb jameslamb merged commit 27b00d7 into master Nov 30, 2024
48 checks passed
@jameslamb jameslamb deleted the python/sklearn-testing branch November 30, 2024 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants