Skip to content

Commit 083bc20

Browse files
authored
Update Colab base image to release-colab_20241217-060132_RC00 (#1458)
http://b/385145217
1 parent 1ddb233 commit 083bc20

File tree

4 files changed

+26
-7
lines changed

4 files changed

+26
-7
lines changed

Dockerfile.tmpl

+9-1
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,16 @@ RUN uv pip uninstall --system google-cloud-bigquery-storage
3232
# to avoid affecting the larger build, we'll post-install it.
3333
RUN uv pip install --no-build-isolation --system "git+https://github.com/Kaggle/learntools"
3434

35+
# b/385161357 Latest Colab uses tf 2.17.1, but tf decision forests only has a version for 2.17.0.
36+
# Instead, we'll install tfdf with its deps and hope that 2.17.0 compat tfdf works with tf 2.17.1.
37+
RUN uv pip install --system --no-deps tensorflow-decision-forests==1.10.0 wurlitzer==3.1.1 ydf==0.9.0
38+
39+
# b/385145217 Latest Colab lacks mkl numpy, install it.
40+
RUN uv pip install --system --force-reinstall -i https://pypi.anaconda.org/intel/simple numpy
41+
3542
# b/328788268 We install an incompatible pair of libs (shapely<2, libpysal==4.9.2) so we can't put this one in the requirements.txt
36-
RUN uv pip install --system "libpysal==4.9.2"
43+
# newer daal4py requires tbb>=2022, but libpysal is downgrading it for some reason
44+
RUN uv pip install --system "tbb>=2022" "libpysal==4.9.2"
3745

3846
# Adding non-package dependencies:
3947

config.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
BASE_IMAGE=us-docker.pkg.dev/colab-images/public/runtime
2-
BASE_IMAGE_TAG=release-colab_20240920-060127_RC00
2+
BASE_IMAGE_TAG=release-colab_20241217-060132_RC00
33
LIGHTGBM_VERSION=4.5.0
44
CUDA_MAJOR_VERSION=12
55
CUDA_MINOR_VERSION=2

kaggle_requirements.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ libpysal<=4.9.2
8585
lime
8686
line_profiler
8787
mamba
88+
matplotlib<3.8
8889
mlcrate
8990
mne
9091
mpld3
@@ -142,7 +143,8 @@ squarify
142143
tensorflow-cloud
143144
tensorflow-io
144145
tensorflow-text
145-
tensorflow_decision_forests
146+
# b/385161357: tf 2.17.1 does not have matching tensorflow_decision_forests release
147+
# tensorflow_decision_forests
146148
timm
147149
torchinfo
148150
torchmetrics

tests/test_numpy.py

+13-4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
from distutils.version import StrictVersion
44

55
import numpy as np
6-
from numpy.distutils.system_info import get_info
6+
import io
7+
from contextlib import redirect_stdout
78

8-
class TestNumpy(unittest.TestCase):
9+
class TestNumpy(unittest.TestCase):
910
def test_version(self):
1011
# b/370860329: newer versions are not capable with current tensorflow
1112
self.assertEqual(StrictVersion(np.__version__), StrictVersion("1.26.4"))
@@ -18,5 +19,13 @@ def test_array(self):
1819
# Numpy must be linked to the MKL. (Occasionally, a third-party package will muck up the installation
1920
# and numpy will be reinstalled with an OpenBLAS backing.)
2021
def test_mkl(self):
21-
# This will throw an exception if the MKL is not linked correctly or return an empty dict.
22-
self.assertTrue(get_info("blas_mkl"))
22+
try:
23+
from numpy.distutils.system_info import get_info
24+
# This will throw an exception if the MKL is not linked correctly or return an empty dict.
25+
self.assertTrue(get_info("blas_mkl"))
26+
except:
27+
# Fallback to check if mkl is present via show_config()
28+
config_out = io.StringIO()
29+
with redirect_stdout(config_out):
30+
np.show_config()
31+
self.assertIn("mkl_rt", config_out.getvalue())

0 commit comments

Comments
 (0)