Skip to content

Commit 42bf08d

Browse files
authored
Upgrade Colab base image (#1533)
From `20251024-060052_RC00` to `20260126-060048_RC00`. Added justification to the diff about other changes included. Next: Move the CPU image to use the Colab dedicated CPU base image. http://b/331651883
1 parent 7b88626 commit 42bf08d

6 files changed

Lines changed: 10 additions & 41 deletions

File tree

Dockerfile.tmpl

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,9 @@ RUN uv pip uninstall --system --no-cache google-cloud-bigquery-storage
2323
# to avoid affecting the larger build, we'll post-install it.
2424
RUN uv pip install --no-build-isolation --no-cache --system "git+https://github.com/Kaggle/learntools"
2525

26-
# newer daal4py requires tbb>=2022, but libpysal is downgrading it for some reason
27-
RUN uv pip install --system --no-cache "tbb>=2022" "libpysal==4.9.2"
28-
29-
# b/404590350: Ray and torchtune have conflicting tune cli, we will prioritize torchtune.
30-
# b/315753846: Unpin translate package, currently conflicts with adk 1.17.0
31-
# b/468379293: Unpin Pandas once cuml/cudf are compatible, version 3.0 causes issues
32-
# b/468383498: numpy will auto-upgrade to 2.4.x, which causes issues with numerous packages
26+
# b/404590350: Ray and torchtune have conflicting cli named `tune`. `ray` is not part of Colab's base image. Re-install `tune` to ensure the torchtune CLI is available by default.
3327
# b/468367647: Unpin protobuf, version greater than v5.29.5 causes issues with numerous packages
34-
RUN uv pip install --system --force-reinstall --no-cache --no-deps torchtune "google-cloud-translate==3.12.1" "numpy==2.0.2" "pandas==2.2.2"
28+
RUN uv pip install --system --force-reinstall --no-cache --no-deps torchtune
3529
RUN uv pip install --system --force-reinstall --no-cache "protobuf==5.29.5"
3630

3731
# Adding non-package dependencies:

config.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
BASE_IMAGE=us-docker.pkg.dev/colab-images/public/runtime
2-
BASE_IMAGE_TAG=release-colab-external_20251024-060052_RC00
2+
BASE_IMAGE_TAG=release-colab-external_20260126-060048_RC00
33
CUDA_MAJOR_VERSION=12
44
CUDA_MINOR_VERSION=5

kaggle_requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ keras-nlp
6565
keras-tuner
6666
kornia
6767
langid
68-
# b/328788268: libpysal 4.10 seems to fail with "module 'shapely' has no attribute 'Geometry'. Did you mean: 'geometry'"
69-
libpysal<=4.9.2
68+
libpysal
7069
lime
7170
line_profiler
7271
mamba
@@ -116,8 +115,9 @@ scikit-plot
116115
scikit-surprise
117116
git+https://github.com/facebookresearch/segment-anything.git
118117
squarify
119-
tensorflow-cloud
120118
tensorflow-io
119+
# Must be compatible with torch version: https://github.com/meta-pytorch/torchcodec?tab=readme-ov-file#installing-torchcodec
120+
torchcodec==0.9
121121
torchinfo
122122
torchmetrics
123123
torchtune

tests/test_tensorflow_cloud.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

tests/test_translation.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from kaggle_gcp import KaggleKernelCredentials, KaggleKernelWithProjetCredentials, init_translation_v2, init_translation_v3
77
from test.support.os_helper import EnvironmentVarGuard
88
from google.api_core import client_options
9-
from google.cloud import translate, translate_v2
9+
from google.cloud import translate_v3 as translate, translate_v2
1010

1111
def _make_credentials():
1212
import google.auth.credentials
@@ -48,7 +48,7 @@ def test_user_provided_credentials_v2(self):
4848
self.assertIsNotNone(client.credentials)
4949
self.assertNotIsInstance(client.credentials, KaggleKernelCredentials)
5050

51-
@patch("google.cloud.translate.TranslationServiceClient", new=FakeClient)
51+
@patch("google.cloud.translate_v3.TranslationServiceClient", new=FakeClient)
5252
def test_default_credentials_v3(self):
5353
env = EnvironmentVarGuard()
5454
env.set('KAGGLE_USER_SECRETS_TOKEN', 'foobar')
@@ -60,7 +60,7 @@ def test_default_credentials_v3(self):
6060
self.assertIsInstance(client.credentials, KaggleKernelCredentials)
6161

6262

63-
@patch("google.cloud.translate.TranslationServiceClient", new=FakeClient)
63+
@patch("google.cloud.translate_v3.TranslationServiceClient", new=FakeClient)
6464
def test_user_provided_credentials_v3(self):
6565
credentials = _make_credentials()
6666
env = EnvironmentVarGuard()
@@ -107,13 +107,12 @@ def test_monkeypatching_idempotent(self):
107107
self.assertEqual(client2_1, client2_2)
108108
self.assertEqual(client3_1, client3_2)
109109

110-
@patch("google.cloud.translate.TranslationServiceClient", new=FakeClient)
110+
@patch("google.cloud.translate_v3.TranslationServiceClient", new=FakeClient)
111111
def test_client_credential_uniqueness_v3(self):
112112
"""
113113
Client instance must use unique KaggleKernelWithProjetCredentials with quota_project_id
114114
when client_options.quota_project_id provided. (even if quota_project_id is same)
115115
"""
116-
credentials = _make_credentials()
117116
env = EnvironmentVarGuard()
118117
env.set('KAGGLE_USER_SECRETS_TOKEN', 'foobar')
119118
env.set('KAGGLE_KERNEL_INTEGRATIONS', 'CLOUDAI')

tests/test_user_secrets.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -200,22 +200,6 @@ def call_get_cloudai_access_token():
200200
client = UserSecretsClient()
201201
secret_response = client._get_cloudai_access_token()
202202
self.assertEqual(secret_response, (secret, now + timedelta(seconds=3600)))
203-
def call_get_translation_access_token():
204-
client = UserSecretsClient()
205-
secret_response = client._get_translation_access_token()
206-
self.assertEqual(secret_response, (secret, now + timedelta(seconds=3600)))
207-
def call_get_natural_lang_access_token():
208-
client = UserSecretsClient()
209-
secret_response = client._get_natural_language_access_token()
210-
self.assertEqual(secret_response, (secret, now + timedelta(seconds=3600)))
211-
def call_get_video_intell_access_token():
212-
client = UserSecretsClient()
213-
secret_response = client._get_video_intelligence_access_token()
214-
self.assertEqual(secret_response, (secret, now + timedelta(seconds=3600)))
215-
def call_get_vision_access_token():
216-
client = UserSecretsClient()
217-
secret_response = client._get_vision_access_token()
218-
self.assertEqual(secret_response, (secret, now + timedelta(seconds=3600)))
219203

220204
self._test_client(call_get_bigquery_access_token,
221205
'/requests/GetUserSecretRequest', {'Target': GcpTarget.BIGQUERY.target},

0 commit comments

Comments
 (0)