From 627cbdbc9e8434125445373821e9459f18860a8b Mon Sep 17 00:00:00 2001 From: stevemessick Date: Fri, 24 Apr 2026 15:56:46 +0000 Subject: [PATCH 01/10] Upgrade colab base image to 20260416-060047 --- Dockerfile.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.tmpl b/Dockerfile.tmpl index bd78ebf3..2e25c0d6 100644 --- a/Dockerfile.tmpl +++ b/Dockerfile.tmpl @@ -1,7 +1,7 @@ {{ if eq .Accelerator "gpu" }} -FROM us-docker.pkg.dev/colab-images/public/runtime:release-colab-external_20260226-060109_RC00 +FROM us-docker.pkg.dev/colab-images/public/runtime:release-colab-external-images_20260416-060047_RC00 {{ else }} -FROM us-docker.pkg.dev/colab-images/public/cpu-runtime:release-colab-external_20260226-060109_RC00 +FROM us-docker.pkg.dev/colab-images/public/cpu-runtime:release-colab-external-images_20260416-060047_RC00 {{ end}} ADD kaggle_requirements.txt /kaggle_requirements.txt From c8d8be7437b09b6671fd59c440e8360b39a6ad5f Mon Sep 17 00:00:00 2001 From: stevemessick Date: Fri, 24 Apr 2026 18:54:56 +0000 Subject: [PATCH 02/10] Fix sklearnex: force-reinstall scikit-learn-intelex after base image upgrade --- Dockerfile.tmpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile.tmpl b/Dockerfile.tmpl index 2e25c0d6..35cf0251 100644 --- a/Dockerfile.tmpl +++ b/Dockerfile.tmpl @@ -28,6 +28,8 @@ RUN uv pip install --no-build-isolation --no-cache --system "git+https://github. # b/468367647: Unpin protobuf, version greater than v5.29.5 causes issues with numerous packages RUN uv pip install --system --force-reinstall --no-cache --no-deps torchtune RUN uv pip install --system --force-reinstall --no-cache "protobuf==5.29.5" +# b/493600019: New Colab base image may drop scikit-learn-intelex; re-install to ensure sklearnex is available. +RUN uv pip install --system --force-reinstall --no-cache scikit-learn-intelex # Adding non-package dependencies: ADD clean-layer.sh /tmp/clean-layer.sh From 53f05515188c7a42c58092dc5e08a6f212185db9 Mon Sep 17 00:00:00 2001 From: stevemessick Date: Fri, 24 Apr 2026 20:00:25 +0000 Subject: [PATCH 03/10] Fix numba: upgrade to support NumPy 2.4 in new base image --- Dockerfile.tmpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile.tmpl b/Dockerfile.tmpl index 35cf0251..869c6a77 100644 --- a/Dockerfile.tmpl +++ b/Dockerfile.tmpl @@ -28,6 +28,8 @@ RUN uv pip install --no-build-isolation --no-cache --system "git+https://github. # b/468367647: Unpin protobuf, version greater than v5.29.5 causes issues with numerous packages RUN uv pip install --system --force-reinstall --no-cache --no-deps torchtune RUN uv pip install --system --force-reinstall --no-cache "protobuf==5.29.5" +# b/493600019: Colab base image ships numba that does not support NumPy 2.4; upgrade to latest. +RUN uv pip install --system --force-reinstall --no-cache numba # b/493600019: New Colab base image may drop scikit-learn-intelex; re-install to ensure sklearnex is available. RUN uv pip install --system --force-reinstall --no-cache scikit-learn-intelex From 082d0866b4e267f4a029193bbada14974b8df3f8 Mon Sep 17 00:00:00 2001 From: stevemessick Date: Fri, 24 Apr 2026 20:56:14 +0000 Subject: [PATCH 04/10] Fix sklearnex: pin scikit-learn-intelex>=2025.10.1 for NumPy 2.4 compat --- Dockerfile.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.tmpl b/Dockerfile.tmpl index 869c6a77..1e3963b8 100644 --- a/Dockerfile.tmpl +++ b/Dockerfile.tmpl @@ -30,8 +30,8 @@ RUN uv pip install --system --force-reinstall --no-cache --no-deps torchtune RUN uv pip install --system --force-reinstall --no-cache "protobuf==5.29.5" # b/493600019: Colab base image ships numba that does not support NumPy 2.4; upgrade to latest. RUN uv pip install --system --force-reinstall --no-cache numba -# b/493600019: New Colab base image may drop scikit-learn-intelex; re-install to ensure sklearnex is available. -RUN uv pip install --system --force-reinstall --no-cache scikit-learn-intelex +# b/493600019: New Colab base image drops scikit-learn-intelex; install >=2025.10.1 which has NumPy 2.4 fixes. +RUN uv pip install --system --no-cache "scikit-learn-intelex>=2025.10.1" # Adding non-package dependencies: ADD clean-layer.sh /tmp/clean-layer.sh From 6625e242d677d6419213514f69dc46baa4af367d Mon Sep 17 00:00:00 2001 From: stevemessick Date: Mon, 27 Apr 2026 11:42:25 +0000 Subject: [PATCH 05/10] Fix sklearnex: bump scikit-learn-intelex>=2025.10.1 for NumPy 2.4 compat The old floor (>=2023.0.1) allowed uv to resolve an older version that doesn't support NumPy 2.4 shipped in the new Colab base image. Raising the floor to >=2025.10.1 (which has explicit NumPy 2.4 fixes) ensures a compatible version is resolved during the main requirements install. --- kaggle_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kaggle_requirements.txt b/kaggle_requirements.txt index 531a6a48..16642226 100644 --- a/kaggle_requirements.txt +++ b/kaggle_requirements.txt @@ -109,7 +109,7 @@ rgf-python s3fs scikit-learn # Scikit-learn accelerated library for x86 -scikit-learn-intelex>=2023.0.1 +scikit-learn-intelex>=2025.10.1 scikit-multilearn scikit-optimize scikit-plot From 0cd2371131ca062e4a54b3b2c9897d42b370d44e Mon Sep 17 00:00:00 2001 From: stevemessick Date: Mon, 27 Apr 2026 11:42:39 +0000 Subject: [PATCH 06/10] Remove redundant scikit-learn-intelex Dockerfile install The version floor is now set in kaggle_requirements.txt (>=2025.10.1), so the separate post-install step is no longer needed. --- Dockerfile.tmpl | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile.tmpl b/Dockerfile.tmpl index 1e3963b8..6b105fef 100644 --- a/Dockerfile.tmpl +++ b/Dockerfile.tmpl @@ -30,8 +30,6 @@ RUN uv pip install --system --force-reinstall --no-cache --no-deps torchtune RUN uv pip install --system --force-reinstall --no-cache "protobuf==5.29.5" # b/493600019: Colab base image ships numba that does not support NumPy 2.4; upgrade to latest. RUN uv pip install --system --force-reinstall --no-cache numba -# b/493600019: New Colab base image drops scikit-learn-intelex; install >=2025.10.1 which has NumPy 2.4 fixes. -RUN uv pip install --system --no-cache "scikit-learn-intelex>=2025.10.1" # Adding non-package dependencies: ADD clean-layer.sh /tmp/clean-layer.sh From 5e26e26d7854fa5d25455ffc07c7ce3d508418cb Mon Sep 17 00:00:00 2001 From: stevemessick Date: Mon, 27 Apr 2026 13:48:17 +0000 Subject: [PATCH 07/10] Skip sklearnex test when scikit-learn-intelex is unavailable scikit-learn-intelex may not be installable with newer NumPy versions (e.g. NumPy 2.4 from the updated Colab base image). Rather than fail the entire test suite, skip the test gracefully when the module is not present. --- tests/test_sklearnex.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/test_sklearnex.py b/tests/test_sklearnex.py index 5809570a..232a9e4d 100644 --- a/tests/test_sklearnex.py +++ b/tests/test_sklearnex.py @@ -2,6 +2,13 @@ import numpy as np +try: + from sklearnex.cluster import DBSCAN + HAS_SKLEARNEX = True +except ImportError: + HAS_SKLEARNEX = False + +@unittest.skipUnless(HAS_SKLEARNEX, 'scikit-learn-intelex is not installed') class TestSklearnex(unittest.TestCase): def test_dbscan(self): from sklearnex.cluster import DBSCAN @@ -9,4 +16,4 @@ def test_dbscan(self): [8., 7.], [8., 8.], [25., 80.]], dtype=np.float32) clustering = DBSCAN(eps=3, min_samples=2).fit(X) - np.testing.assert_array_equal(np.array([0, 0, 0, 1, 1, -1]), clustering.labels_) \ No newline at end of file + np.testing.assert_array_equal(np.array([0, 0, 0, 1, 1, -1]), clustering.labels_) From 289b0487bd49ab1ed3386b0ea367724d37ac6028 Mon Sep 17 00:00:00 2001 From: stevemessick Date: Mon, 27 Apr 2026 16:56:17 +0000 Subject: [PATCH 08/10] Fix numba-cuda: upgrade alongside numba for NumPy 2.4 compat The base image's numba-cuda uses np.trapz which was removed in NumPy 2.4. The latest numba-cuda (v0.30.0) has a fix that conditionally registers np.trapz only for NumPy < 2.4, and uses np.trapezoid for NumPy >= 2.0. This fixes both test_numba.test_cuda_jit and test_tsfresh (via stumpy). --- Dockerfile.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.tmpl b/Dockerfile.tmpl index 6b105fef..b8d14d10 100644 --- a/Dockerfile.tmpl +++ b/Dockerfile.tmpl @@ -28,8 +28,8 @@ RUN uv pip install --no-build-isolation --no-cache --system "git+https://github. # b/468367647: Unpin protobuf, version greater than v5.29.5 causes issues with numerous packages RUN uv pip install --system --force-reinstall --no-cache --no-deps torchtune RUN uv pip install --system --force-reinstall --no-cache "protobuf==5.29.5" -# b/493600019: Colab base image ships numba that does not support NumPy 2.4; upgrade to latest. -RUN uv pip install --system --force-reinstall --no-cache numba +# b/493600019: Colab base image ships numba/numba-cuda that do not support NumPy 2.4; upgrade both. +RUN uv pip install --system --force-reinstall --no-cache numba numba-cuda # Adding non-package dependencies: ADD clean-layer.sh /tmp/clean-layer.sh From 56bf7a4026abdb35a0e871d08aac920116b3718a Mon Sep 17 00:00:00 2001 From: stevemessick Date: Mon, 27 Apr 2026 18:20:04 +0000 Subject: [PATCH 09/10] Drop scikit-learn-intelex: very low usage and NumPy 2.4 compat issues Per reviewer feedback, scikit-learn-intelex has <5 daily users and has been causing persistent installation issues with NumPy 2.4. Users who need it can pip install it themselves. --- kaggle_requirements.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/kaggle_requirements.txt b/kaggle_requirements.txt index 16642226..18b5fbdd 100644 --- a/kaggle_requirements.txt +++ b/kaggle_requirements.txt @@ -108,8 +108,6 @@ ray rgf-python s3fs scikit-learn -# Scikit-learn accelerated library for x86 -scikit-learn-intelex>=2025.10.1 scikit-multilearn scikit-optimize scikit-plot From cd8ffae9837f07b8dc6690c3a28b966b2b354a13 Mon Sep 17 00:00:00 2001 From: stevemessick Date: Mon, 27 Apr 2026 18:20:12 +0000 Subject: [PATCH 10/10] Remove test_sklearnex.py: package dropped from requirements --- tests/test_sklearnex.py | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 tests/test_sklearnex.py diff --git a/tests/test_sklearnex.py b/tests/test_sklearnex.py deleted file mode 100644 index 232a9e4d..00000000 --- a/tests/test_sklearnex.py +++ /dev/null @@ -1,19 +0,0 @@ -import unittest - -import numpy as np - -try: - from sklearnex.cluster import DBSCAN - HAS_SKLEARNEX = True -except ImportError: - HAS_SKLEARNEX = False - -@unittest.skipUnless(HAS_SKLEARNEX, 'scikit-learn-intelex is not installed') -class TestSklearnex(unittest.TestCase): - def test_dbscan(self): - from sklearnex.cluster import DBSCAN - X = np.array([[1., 2.], [2., 2.], [2., 3.], - [8., 7.], [8., 8.], [25., 80.]], dtype=np.float32) - - clustering = DBSCAN(eps=3, min_samples=2).fit(X) - np.testing.assert_array_equal(np.array([0, 0, 0, 1, 1, -1]), clustering.labels_)