From 420558378a6ada814b6776260aa059405485645e Mon Sep 17 00:00:00 2001 From: Derrick Williams Date: Mon, 8 Dec 2025 17:35:05 +0000 Subject: [PATCH 1/2] first try for updated tox --- sdks/python/tox.ini | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/sdks/python/tox.ini b/sdks/python/tox.ini index 52fd82d41153..9db5cd09dc3c 100644 --- a/sdks/python/tox.ini +++ b/sdks/python/tox.ini @@ -518,21 +518,16 @@ commands = [testenv:py{310,311}-transformers-{428,447,448,latest}] deps = # sentence-transformers 2.2.2 is the latest version that supports transformers 4.28.x - 428: sentence-transformers==2.2.2 - 428: transformers>=4.28.0,<4.29.0 - 428: torch>=1.9.0,<1.14.0 - 447: transformers>=4.47.0,<4.48.0 - 447: torch>=1.9.0,<1.14.0 - 455: transformers>=4.55.0,<4.56.0 - 455: torch>=2.0.0,<2.1.0 - latest: transformers>=4.55.0 - latest: torch>=2.0.0 - latest: accelerate>=1.6.0 - tensorflow==2.12.0 - protobuf==4.25.5 - pip==25.0.1 + # deps handled in environment variables and comman command extras = test,gcp,ml_test +setenv = + COMMON_DEPS = tensorflow==2.12.0 protobuf==4.25.5 pip==25.0.1 + 428: DEPS = sentence-transformers==2.2.2 'transformers>=4.28.0,<4.29.0' 'torch>=1.9.0,<1.14.0' + 447: DEPS = 'transformers>=4.47.0,<4.48.0' 'torch>=1.9.0,<1.14.0' + 455: DEPS = 'transformers>=4.55.0,<4.56.0' 'torch>=2.0.0,<2.1.0' + latest: DEPS = 'transformers>=4.55.0' 'torch>=2.0.0' 'accelerate>=1.6.0' commands = + /bin/sh -c "pip install .[{extras}] {env:DEPS} {env:COMMON_DEPS}" # Log transformers and its dependencies version for debugging /bin/sh -c "pip freeze | grep -E transformers" /bin/sh -c "pip freeze | grep -E torch" From decdad89e269993f2d1eb962d6bbf165ed82f018 Mon Sep 17 00:00:00 2001 From: tvalentyn Date: Wed, 10 Dec 2025 14:51:03 -0800 Subject: [PATCH 2/2] Update tox.ini --- sdks/python/tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdks/python/tox.ini b/sdks/python/tox.ini index 9db5cd09dc3c..afb9b6520fb6 100644 --- a/sdks/python/tox.ini +++ b/sdks/python/tox.ini @@ -517,11 +517,11 @@ commands = [testenv:py{310,311}-transformers-{428,447,448,latest}] deps = - # sentence-transformers 2.2.2 is the latest version that supports transformers 4.28.x - # deps handled in environment variables and comman command + # Environment dependencies are defined in the `setenv` section and installed in the `commands` section. extras = test,gcp,ml_test setenv = COMMON_DEPS = tensorflow==2.12.0 protobuf==4.25.5 pip==25.0.1 + # sentence-transformers 2.2.2 is the latest version that supports transformers 4.28.x 428: DEPS = sentence-transformers==2.2.2 'transformers>=4.28.0,<4.29.0' 'torch>=1.9.0,<1.14.0' 447: DEPS = 'transformers>=4.47.0,<4.48.0' 'torch>=1.9.0,<1.14.0' 455: DEPS = 'transformers>=4.55.0,<4.56.0' 'torch>=2.0.0,<2.1.0'