diff --git a/Dockerfile.tmpl b/Dockerfile.tmpl index 8f45f265..1aaeaf2d 100644 --- a/Dockerfile.tmpl +++ b/Dockerfile.tmpl @@ -23,15 +23,9 @@ RUN uv pip uninstall --system --no-cache google-cloud-bigquery-storage # to avoid affecting the larger build, we'll post-install it. RUN uv pip install --no-build-isolation --no-cache --system "git+https://github.com/Kaggle/learntools" -# newer daal4py requires tbb>=2022, but libpysal is downgrading it for some reason -RUN uv pip install --system --no-cache "tbb>=2022" "libpysal==4.9.2" - -# b/404590350: Ray and torchtune have conflicting tune cli, we will prioritize torchtune. -# b/315753846: Unpin translate package, currently conflicts with adk 1.17.0 -# b/468379293: Unpin Pandas once cuml/cudf are compatible, version 3.0 causes issues -# b/468383498: numpy will auto-upgrade to 2.4.x, which causes issues with numerous packages +# 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. # 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 "google-cloud-translate==3.12.1" "numpy==2.0.2" "pandas==2.2.2" +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" # Adding non-package dependencies: diff --git a/config.txt b/config.txt index 9546b47a..e9c2ea30 100644 --- a/config.txt +++ b/config.txt @@ -1,4 +1,4 @@ BASE_IMAGE=us-docker.pkg.dev/colab-images/public/runtime -BASE_IMAGE_TAG=release-colab-external_20251024-060052_RC00 +BASE_IMAGE_TAG=release-colab-external_20260126-060048_RC00 CUDA_MAJOR_VERSION=12 CUDA_MINOR_VERSION=5 diff --git a/kaggle_requirements.txt b/kaggle_requirements.txt index 4799254b..30e0683f 100644 --- a/kaggle_requirements.txt +++ b/kaggle_requirements.txt @@ -65,8 +65,7 @@ keras-nlp keras-tuner kornia langid -# b/328788268: libpysal 4.10 seems to fail with "module 'shapely' has no attribute 'Geometry'. Did you mean: 'geometry'" -libpysal<=4.9.2 +libpysal lime line_profiler mamba @@ -116,8 +115,9 @@ scikit-plot scikit-surprise git+https://github.com/facebookresearch/segment-anything.git squarify -tensorflow-cloud tensorflow-io +# Must be compatible with torch version: https://github.com/meta-pytorch/torchcodec?tab=readme-ov-file#installing-torchcodec +torchcodec==0.9 torchinfo torchmetrics torchtune diff --git a/tests/test_tensorflow_cloud.py b/tests/test_tensorflow_cloud.py deleted file mode 100644 index 2875e121..00000000 --- a/tests/test_tensorflow_cloud.py +++ /dev/null @@ -1,8 +0,0 @@ -import unittest - -import tensorflow_cloud as tfc - - -class TestTensorflowCloud(unittest.TestCase): - def test_remote(self): - self.assertFalse(tfc.remote()) diff --git a/tests/test_translation.py b/tests/test_translation.py index 5bb41b62..52de2a08 100644 --- a/tests/test_translation.py +++ b/tests/test_translation.py @@ -6,7 +6,7 @@ from kaggle_gcp import KaggleKernelCredentials, KaggleKernelWithProjetCredentials, init_translation_v2, init_translation_v3 from test.support.os_helper import EnvironmentVarGuard from google.api_core import client_options -from google.cloud import translate, translate_v2 +from google.cloud import translate_v3 as translate, translate_v2 def _make_credentials(): import google.auth.credentials @@ -48,7 +48,7 @@ def test_user_provided_credentials_v2(self): self.assertIsNotNone(client.credentials) self.assertNotIsInstance(client.credentials, KaggleKernelCredentials) - @patch("google.cloud.translate.TranslationServiceClient", new=FakeClient) + @patch("google.cloud.translate_v3.TranslationServiceClient", new=FakeClient) def test_default_credentials_v3(self): env = EnvironmentVarGuard() env.set('KAGGLE_USER_SECRETS_TOKEN', 'foobar') @@ -60,7 +60,7 @@ def test_default_credentials_v3(self): self.assertIsInstance(client.credentials, KaggleKernelCredentials) - @patch("google.cloud.translate.TranslationServiceClient", new=FakeClient) + @patch("google.cloud.translate_v3.TranslationServiceClient", new=FakeClient) def test_user_provided_credentials_v3(self): credentials = _make_credentials() env = EnvironmentVarGuard() @@ -107,13 +107,12 @@ def test_monkeypatching_idempotent(self): self.assertEqual(client2_1, client2_2) self.assertEqual(client3_1, client3_2) - @patch("google.cloud.translate.TranslationServiceClient", new=FakeClient) + @patch("google.cloud.translate_v3.TranslationServiceClient", new=FakeClient) def test_client_credential_uniqueness_v3(self): """ Client instance must use unique KaggleKernelWithProjetCredentials with quota_project_id when client_options.quota_project_id provided. (even if quota_project_id is same) """ - credentials = _make_credentials() env = EnvironmentVarGuard() env.set('KAGGLE_USER_SECRETS_TOKEN', 'foobar') env.set('KAGGLE_KERNEL_INTEGRATIONS', 'CLOUDAI') diff --git a/tests/test_user_secrets.py b/tests/test_user_secrets.py index 67c628f7..c11432fe 100644 --- a/tests/test_user_secrets.py +++ b/tests/test_user_secrets.py @@ -200,22 +200,6 @@ def call_get_cloudai_access_token(): client = UserSecretsClient() secret_response = client._get_cloudai_access_token() self.assertEqual(secret_response, (secret, now + timedelta(seconds=3600))) - def call_get_translation_access_token(): - client = UserSecretsClient() - secret_response = client._get_translation_access_token() - self.assertEqual(secret_response, (secret, now + timedelta(seconds=3600))) - def call_get_natural_lang_access_token(): - client = UserSecretsClient() - secret_response = client._get_natural_language_access_token() - self.assertEqual(secret_response, (secret, now + timedelta(seconds=3600))) - def call_get_video_intell_access_token(): - client = UserSecretsClient() - secret_response = client._get_video_intelligence_access_token() - self.assertEqual(secret_response, (secret, now + timedelta(seconds=3600))) - def call_get_vision_access_token(): - client = UserSecretsClient() - secret_response = client._get_vision_access_token() - self.assertEqual(secret_response, (secret, now + timedelta(seconds=3600))) self._test_client(call_get_bigquery_access_token, '/requests/GetUserSecretRequest', {'Target': GcpTarget.BIGQUERY.target},