File tree Expand file tree Collapse file tree 4 files changed +26
-7
lines changed
Expand file tree Collapse file tree 4 files changed +26
-7
lines changed Original file line number Diff line number Diff 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.
3333RUN 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
Original file line number Diff line number Diff line change 11BASE_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
33LIGHTGBM_VERSION=4.5.0
44CUDA_MAJOR_VERSION=12
55CUDA_MINOR_VERSION=2
Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ libpysal<=4.9.2
8585lime
8686line_profiler
8787mamba
88+ matplotlib<3.8
8889mlcrate
8990mne
9091mpld3
@@ -142,7 +143,8 @@ squarify
142143tensorflow-cloud
143144tensorflow-io
144145tensorflow-text
145- tensorflow_decision_forests
146+ # b/385161357: tf 2.17.1 does not have matching tensorflow_decision_forests release
147+ # tensorflow_decision_forests
146148timm
147149torchinfo
148150torchmetrics
Original file line number Diff line number Diff line change 33from distutils .version import StrictVersion
44
55import 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 ())
You can’t perform that action at this time.
0 commit comments