Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ branchProtectionRules:
- 'Presubmit - Unit Tests Python 3.10'
- 'Presubmit - Unit Tests Python 3.11'
- 'Presubmit - Unit Tests Python 3.12'
- 'Presubmit - Unit Tests Python 3.13'
- 'Presubmit - Unit Tests Ray 2.9.3'
- 'Presubmit - Unit Tests Ray 2.33.0'
- 'Presubmit - Unit Tests Ray 2.42.0 (Python 3.10)'
- 'Presubmit - Unit Tests Ray 2.42.0 (Python 3.11)'
- 'Presubmit - Unit Tests Ray 2.47.1 (Python 3.11)'
- 'Presubmit - Unit Tests LangChain (Python 3.9)'
- 'Presubmit - Unit Tests LangChain (Python 3.10)'
- 'Presubmit - Unit Tests LangChain (Python 3.11)'
- 'Presubmit - Unit Tests LangChain (Python 3.11)'
- 'Presubmit - Unit Tests LangChain (Python 3.12)'
- 'Presubmit - Unit Tests LangChain (Python 3.13)'
2 changes: 1 addition & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- name: Checkout code
Expand Down
8 changes: 4 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
"recommonmark",
)

UNIT_TEST_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12"]
UNIT_TEST_LANGCHAIN_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12"]
UNIT_TEST_AG2_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12"]
UNIT_TEST_LLAMA_INDEX_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12"]
UNIT_TEST_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13"]
UNIT_TEST_LANGCHAIN_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13"]
UNIT_TEST_AG2_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13"]
UNIT_TEST_LLAMA_INDEX_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13"]
PYTHON_TO_RAY_VERSIONS = {
"3.10": ["2.9.3", "2.33.0", "2.42.0"],
"3.11": ["2.42.0", "2.47.1"],
Expand Down
4 changes: 3 additions & 1 deletion owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
templated_files = common.py_library(
cov_level=98,
system_test_python_versions=["3.9"],
unit_test_python_versions=["3.9", "3.10", "3.11", "3.12"],
unit_test_python_versions=["3.9", "3.10", "3.11", "3.12", "3.13"],
unit_test_extras=["testing"],
system_test_extras=["testing"],
microgenerator=True,
Expand All @@ -126,10 +126,12 @@
".kokoro/samples/python3.10/common.cfg",
".kokoro/samples/python3.11/common.cfg",
".kokoro/samples/python3.12/common.cfg",
".kokoro/samples/python3.13/common.cfg",
".kokoro/samples/python3.9/periodic.cfg",
".kokoro/samples/python3.10/periodic.cfg",
".kokoro/samples/python3.11/periodic.cfg",
".kokoro/samples/python3.12/periodic.cfg",
".kokoro/samples/python3.13/periodic.cfg",
".github/auto-label.yaml",
".github/blunderbuss.yml",
".github/CODEOWNERS",
Expand Down
21 changes: 13 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@
tensorboard_extra_require = profiler_extra_require

metadata_extra_require = ["pandas >= 1.0.0", "numpy>=1.15.0"]
xai_extra_require = ["tensorflow >=2.3.0, <3.0.0"]
xai_extra_require = ["tensorflow >=2.3.0, <3.0.0; python_version<'3.13'"]
lit_extra_require = [
"tensorflow >= 2.3.0, <3.0.0",
"tensorflow >= 2.3.0, <3.0.0; python_version<'3.13'",
"pandas >= 1.0.0",
"lit-nlp == 0.4.0",
"explainable-ai-sdk >= 1.0.0",
"explainable-ai-sdk >= 1.0.0; python_version<'3.13'",
]
featurestore_extra_require = [
"google-cloud-bigquery-storage",
Expand Down Expand Up @@ -131,7 +131,7 @@
"ray[train]",
# Framework version constraints copied from testing_extra_require
"scikit-learn<1.6.0",
"tensorflow",
"tensorflow; python_version<'3.13'",
"torch >= 2.0.0, < 2.1.0",
"xgboost",
"xgboost_ray",
Expand Down Expand Up @@ -250,20 +250,23 @@
# google-api-core 2.x is required since kfp requires protobuf > 4
"google-api-core >= 2.11, < 3.0.0",
"grpcio-testing",
"grpcio-tools >= 1.63.0; python_version>='3.13'",
"ipython",
"kfp >= 2.6.0, < 3.0.0",
"kfp >= 2.6.0, < 3.0.0; python_version<'3.13'",
"pytest-asyncio",
"pytest-cov",
"mock",
"pytest-xdist",
"scikit-learn<1.6.0; python_version<='3.10'",
"scikit-learn; python_version>'3.10'",
# Lazy import requires > 2.12.0
"tensorflow == 2.14.1; python_version<='3.11'",
"tensorflow == 2.19.0; python_version>'3.11'",
"tensorflow == 2.19.0; python_version>'3.11' and python_version<'3.13'",
"protobuf <= 5.29.4",
# TODO(jayceeli) torch 2.1.0 has conflict with pyfakefs, will check if
# future versions fix this issue
"torch >= 2.0.0, < 2.1.0; python_version<='3.11'",
"torch >= 2.2.0; python_version>'3.11'",
"torch >= 2.2.0; python_version>'3.11' and python_version<'3.13'",
"requests-toolbelt <= 1.0.0",
"immutabledict",
"xgboost",
Expand Down Expand Up @@ -300,7 +303,8 @@
"proto-plus >= 1.22.3, <2.0.0",
"protobuf>=3.20.2,<7.0.0,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5",
"packaging >= 14.3",
"google-cloud-storage >= 1.32.0, < 3.0.0",
"google-cloud-storage >= 1.32.0, < 3.0.0; python_version<'3.13'",
"google-cloud-storage >= 2.10.0, < 3.0.0; python_version>='3.13'",
"google-cloud-bigquery >= 1.15.0, < 4.0.0, !=3.20.0",
"google-cloud-resource-manager >= 1.3.3, < 3.0.0",
"shapely < 3.0.0",
Expand Down Expand Up @@ -348,6 +352,7 @@
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Internet",
"Topic :: Software Development :: Libraries :: Python Modules",
],
Expand Down
15 changes: 15 additions & 0 deletions testing/constraints-3.13.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# -*- coding: utf-8 -*-
# This constraints file is required for unit tests.
# List all library dependencies and extras in this file.
google-api-core==2.21.0 # Tests google-api-core with rest async support
google-auth==2.35.0 # Tests google-auth with rest async support
proto-plus
mock==4.0.2
google-cloud-storage==2.10.0 # Increased for kfp 2.0 compatibility
packaging==24.1 # Increased to unbreak canonicalize_version error (b/377774673)
pytest-xdist==3.3.1 # Pinned to unbreak unit tests
ray==2.5.0 # Pinned until 2.9.3 is verified for Ray tests
ipython==8.22.2 # Pinned to unbreak TypeAliasType import error
google-adk==0.0.2
google-genai>=1.10.0
google-vizier==0.1.21
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
#

import pytest
import sys

if sys.version_info >= (3, 13):
pytest.skip("Tensorflow not available for Python 3.13+", allow_module_level=True)

import tensorflow.compat.v1 as tf

from google.cloud.aiplatform import models
Expand All @@ -27,6 +32,7 @@


@pytest.mark.usefixtures("google_auth_mock")
@pytest.mark.skipif(tf is None, reason="Tensorflow not available for Python 3.13+")
class SavedModelMetadataBuilderTF1Test(tf.test.TestCase):
def _set_up(self):
self.sess = tf.Session(graph=tf.Graph())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
#

import pytest
import sys

if sys.version_info >= (3, 13):
pytest.skip("Tensorflow not available for Python 3.13+", allow_module_level=True)

import tensorflow as tf
import numpy as np

Expand Down
7 changes: 7 additions & 0 deletions tests/unit/aiplatform/test_logdir_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@
import shutil
import tempfile

import sys

import pytest

if sys.version_info >= (3, 13):
pytest.skip("Tensorflow not available for Python 3.13+", allow_module_level=True)

from google.cloud.aiplatform.tensorboard import logdir_loader
import tensorflow as tf

Expand Down
7 changes: 7 additions & 0 deletions tests/unit/aiplatform/test_uploader_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
from unittest import mock

from absl.testing import absltest
import sys

import pytest

if sys.version_info >= (3, 13):
pytest.skip("Tensorboard not available for Python 3.13+", allow_module_level=True)

from google.cloud.aiplatform.tensorboard import uploader_utils


Expand Down
Loading