From 5d24020377601cc2eb36581cead74e8306ceaebd Mon Sep 17 00:00:00 2001 From: Jack McCluskey Date: Wed, 9 Oct 2024 11:38:00 -0400 Subject: [PATCH 01/11] Pin protobuf version for TF dependency tests --- sdks/python/tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdks/python/tox.ini b/sdks/python/tox.ini index 2dfe0670ed0ff..776adcc891174 100644 --- a/sdks/python/tox.ini +++ b/sdks/python/tox.ini @@ -393,6 +393,7 @@ deps = 212: tensorflow>=2.12rc1,<2.13 # Help pip resolve conflict with typing-extensions for old version of TF https://github.com/apache/beam/issues/30852 212: pydantic<2.7 + 212: protobuf>=4.0.0,<5.0.0.dev0 extras = test,gcp commands = # Log tensorflow version for debugging @@ -424,6 +425,7 @@ deps = 430: transformers>=4.30.0,<4.31.0 torch>=1.9.0,<1.14.0 tensorflow==2.12.0 + protobuf>=4.0.0,<5.0.0.dev0 extras = test,gcp commands = # Log transformers and its dependencies version for debugging From 080fafb634b180fe5390c450af470d34efdfa520 Mon Sep 17 00:00:00 2001 From: Jack McCluskey Date: Wed, 9 Oct 2024 13:13:22 -0400 Subject: [PATCH 02/11] pin specfic protobuf version --- 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 776adcc891174..b75a8d26b73d4 100644 --- a/sdks/python/tox.ini +++ b/sdks/python/tox.ini @@ -393,7 +393,7 @@ deps = 212: tensorflow>=2.12rc1,<2.13 # Help pip resolve conflict with typing-extensions for old version of TF https://github.com/apache/beam/issues/30852 212: pydantic<2.7 - 212: protobuf>=4.0.0,<5.0.0.dev0 + 212: protobuf==4.22.5 extras = test,gcp commands = # Log tensorflow version for debugging @@ -425,7 +425,7 @@ deps = 430: transformers>=4.30.0,<4.31.0 torch>=1.9.0,<1.14.0 tensorflow==2.12.0 - protobuf>=4.0.0,<5.0.0.dev0 + protobuf==4.22.1 extras = test,gcp commands = # Log transformers and its dependencies version for debugging From 8af7c596276ddbd4a9a7c874cbfb998471ba5ee5 Mon Sep 17 00:00:00 2001 From: Jack McCluskey Date: Wed, 9 Oct 2024 14:05:26 -0400 Subject: [PATCH 03/11] increment tested TF version --- sdks/python/test-suites/tox/py39/build.gradle | 6 +++--- sdks/python/tox.ini | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/sdks/python/test-suites/tox/py39/build.gradle b/sdks/python/test-suites/tox/py39/build.gradle index ea02e9d5b1e87..347725fffc1a1 100644 --- a/sdks/python/test-suites/tox/py39/build.gradle +++ b/sdks/python/test-suites/tox/py39/build.gradle @@ -149,9 +149,9 @@ postCommitPyDep.dependsOn "testPy39tft-113" // postCommitPyDep.dependsOn "testPy39onnx-113" // Create a test task for each minor version of tensorflow -toxTask "testPy39tensorflow-212", "py39-tensorflow-212", "${posargs}" -test.dependsOn "testPy39tensorflow-212" -postCommitPyDep.dependsOn "testPy39tensorflow-212" +toxTask "testPy39tensorflow-213", "py39-tensorflow-213", "${posargs}" +test.dependsOn "testPy39tensorflow-213" +postCommitPyDep.dependsOn "testPy39tensorflow-213" // Create a test task for each minor version of transformers toxTask "testPy39transformers-428", "py39-transformers-428", "${posargs}" diff --git a/sdks/python/tox.ini b/sdks/python/tox.ini index b75a8d26b73d4..ceb4a32f7c3c0 100644 --- a/sdks/python/tox.ini +++ b/sdks/python/tox.ini @@ -388,12 +388,11 @@ commands = # Run all ONNX unit tests pytest -o junit_suite_name={envname} --junitxml=pytest_{envname}.xml -n 6 -m uses_onnx {posargs} -[testenv:py39-tensorflow-212] +[testenv:py39-tensorflow-213] deps = - 212: tensorflow>=2.12rc1,<2.13 + 212: tensorflow>=2.13rc1,<2.14 # Help pip resolve conflict with typing-extensions for old version of TF https://github.com/apache/beam/issues/30852 212: pydantic<2.7 - 212: protobuf==4.22.5 extras = test,gcp commands = # Log tensorflow version for debugging From c05537f3d7d4f584e3de4a5fc69fc87474049dbf Mon Sep 17 00:00:00 2001 From: Jack McCluskey Date: Wed, 9 Oct 2024 14:07:24 -0400 Subject: [PATCH 04/11] pin at higher version of protobuf --- sdks/python/test-suites/tox/py39/build.gradle | 6 +++--- sdks/python/tox.ini | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sdks/python/test-suites/tox/py39/build.gradle b/sdks/python/test-suites/tox/py39/build.gradle index 347725fffc1a1..ea02e9d5b1e87 100644 --- a/sdks/python/test-suites/tox/py39/build.gradle +++ b/sdks/python/test-suites/tox/py39/build.gradle @@ -149,9 +149,9 @@ postCommitPyDep.dependsOn "testPy39tft-113" // postCommitPyDep.dependsOn "testPy39onnx-113" // Create a test task for each minor version of tensorflow -toxTask "testPy39tensorflow-213", "py39-tensorflow-213", "${posargs}" -test.dependsOn "testPy39tensorflow-213" -postCommitPyDep.dependsOn "testPy39tensorflow-213" +toxTask "testPy39tensorflow-212", "py39-tensorflow-212", "${posargs}" +test.dependsOn "testPy39tensorflow-212" +postCommitPyDep.dependsOn "testPy39tensorflow-212" // Create a test task for each minor version of transformers toxTask "testPy39transformers-428", "py39-transformers-428", "${posargs}" diff --git a/sdks/python/tox.ini b/sdks/python/tox.ini index ceb4a32f7c3c0..484470fc35771 100644 --- a/sdks/python/tox.ini +++ b/sdks/python/tox.ini @@ -390,9 +390,10 @@ commands = [testenv:py39-tensorflow-213] deps = - 212: tensorflow>=2.13rc1,<2.14 + 212: tensorflow>=2.12rc1,<2.13 # Help pip resolve conflict with typing-extensions for old version of TF https://github.com/apache/beam/issues/30852 212: pydantic<2.7 + 212: protobuf==4.25.5 extras = test,gcp commands = # Log tensorflow version for debugging @@ -424,7 +425,7 @@ deps = 430: transformers>=4.30.0,<4.31.0 torch>=1.9.0,<1.14.0 tensorflow==2.12.0 - protobuf==4.22.1 + protobuf==4.25.5 extras = test,gcp commands = # Log transformers and its dependencies version for debugging From 282b96c38ac09e118e655f966167d8b09dfc8cd4 Mon Sep 17 00:00:00 2001 From: Jack McCluskey Date: Wed, 9 Oct 2024 15:06:04 -0400 Subject: [PATCH 05/11] fix incorrect configuration --- sdks/python/tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdks/python/tox.ini b/sdks/python/tox.ini index 484470fc35771..f9a371df52d94 100644 --- a/sdks/python/tox.ini +++ b/sdks/python/tox.ini @@ -388,7 +388,7 @@ commands = # Run all ONNX unit tests pytest -o junit_suite_name={envname} --junitxml=pytest_{envname}.xml -n 6 -m uses_onnx {posargs} -[testenv:py39-tensorflow-213] +[testenv:py39-tensorflow-212] deps = 212: tensorflow>=2.12rc1,<2.13 # Help pip resolve conflict with typing-extensions for old version of TF https://github.com/apache/beam/issues/30852 From 77be5989a60ac73a5f29beb0a07e4e15ef59a2a6 Mon Sep 17 00:00:00 2001 From: Jack McCluskey Date: Wed, 9 Oct 2024 16:02:34 -0400 Subject: [PATCH 06/11] try bumping tf version --- sdks/python/test-suites/tox/py39/build.gradle | 6 +++--- sdks/python/tox.ini | 7 +++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/sdks/python/test-suites/tox/py39/build.gradle b/sdks/python/test-suites/tox/py39/build.gradle index ea02e9d5b1e87..347725fffc1a1 100644 --- a/sdks/python/test-suites/tox/py39/build.gradle +++ b/sdks/python/test-suites/tox/py39/build.gradle @@ -149,9 +149,9 @@ postCommitPyDep.dependsOn "testPy39tft-113" // postCommitPyDep.dependsOn "testPy39onnx-113" // Create a test task for each minor version of tensorflow -toxTask "testPy39tensorflow-212", "py39-tensorflow-212", "${posargs}" -test.dependsOn "testPy39tensorflow-212" -postCommitPyDep.dependsOn "testPy39tensorflow-212" +toxTask "testPy39tensorflow-213", "py39-tensorflow-213", "${posargs}" +test.dependsOn "testPy39tensorflow-213" +postCommitPyDep.dependsOn "testPy39tensorflow-213" // Create a test task for each minor version of transformers toxTask "testPy39transformers-428", "py39-transformers-428", "${posargs}" diff --git a/sdks/python/tox.ini b/sdks/python/tox.ini index f9a371df52d94..3b9d8531fb9e5 100644 --- a/sdks/python/tox.ini +++ b/sdks/python/tox.ini @@ -388,12 +388,11 @@ commands = # Run all ONNX unit tests pytest -o junit_suite_name={envname} --junitxml=pytest_{envname}.xml -n 6 -m uses_onnx {posargs} -[testenv:py39-tensorflow-212] +[testenv:py39-tensorflow-213] deps = - 212: tensorflow>=2.12rc1,<2.13 + 212: tensorflow>=2.13rc1,<2.14 # Help pip resolve conflict with typing-extensions for old version of TF https://github.com/apache/beam/issues/30852 212: pydantic<2.7 - 212: protobuf==4.25.5 extras = test,gcp commands = # Log tensorflow version for debugging @@ -424,7 +423,7 @@ deps = 429: transformers>=4.29.0,<4.30.0 430: transformers>=4.30.0,<4.31.0 torch>=1.9.0,<1.14.0 - tensorflow==2.12.0 + tensorflow==2.13.0 protobuf==4.25.5 extras = test,gcp commands = From 6c8a5366e394fd1c37b3bb7dcee9dcbbcd69fa4a Mon Sep 17 00:00:00 2001 From: Jack McCluskey Date: Thu, 10 Oct 2024 09:54:15 -0400 Subject: [PATCH 07/11] further specify dependency versions --- sdks/python/tox.ini | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/sdks/python/tox.ini b/sdks/python/tox.ini index 3b9d8531fb9e5..e8402b87055f4 100644 --- a/sdks/python/tox.ini +++ b/sdks/python/tox.ini @@ -390,9 +390,11 @@ commands = [testenv:py39-tensorflow-213] deps = - 212: tensorflow>=2.13rc1,<2.14 - # Help pip resolve conflict with typing-extensions for old version of TF https://github.com/apache/beam/issues/30852 - 212: pydantic<2.7 + 213: + tensorflow>=2.13rc1,<2.14 + # Help pip resolve conflict with typing-extensions for old version of TF https://github.com/apache/beam/issues/30852 + pydantic<2.7 + protobuf==4.25.5 extras = test,gcp commands = # Log tensorflow version for debugging @@ -419,12 +421,21 @@ commands = [testenv:py{39,310}-transformers-{428,429,430}] deps = - 428: transformers>=4.28.0,<4.29.0 - 429: transformers>=4.29.0,<4.30.0 - 430: transformers>=4.30.0,<4.31.0 - torch>=1.9.0,<1.14.0 - tensorflow==2.13.0 - protobuf==4.25.5 + 428: + transformers>=4.28.0,<4.29.0 + torch>=1.9.0,<1.14.0 + tensorflow==2.12.0 + protobuf==4.25.5 + 429: + transformers>=4.29.0,<4.30.0 + torch>=1.9.0,<1.14.0 + tensorflow==2.12.0 + protobuf==4.25.5 + 430: + transformers>=4.30.0,<4.31.0 + torch>=1.9.0,<1.14.0 + tensorflow==2.12.0 + protobuf==4.25.5 extras = test,gcp commands = # Log transformers and its dependencies version for debugging From 8cfca1fb9a1a8ce728e22fc6379ce1dcc0260b51 Mon Sep 17 00:00:00 2001 From: Jack McCluskey Date: Fri, 11 Oct 2024 11:43:08 -0400 Subject: [PATCH 08/11] try adding other ml testing deps for compat --- sdks/python/test-suites/tox/py39/build.gradle | 6 +++--- sdks/python/tox.ini | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sdks/python/test-suites/tox/py39/build.gradle b/sdks/python/test-suites/tox/py39/build.gradle index 347725fffc1a1..ea02e9d5b1e87 100644 --- a/sdks/python/test-suites/tox/py39/build.gradle +++ b/sdks/python/test-suites/tox/py39/build.gradle @@ -149,9 +149,9 @@ postCommitPyDep.dependsOn "testPy39tft-113" // postCommitPyDep.dependsOn "testPy39onnx-113" // Create a test task for each minor version of tensorflow -toxTask "testPy39tensorflow-213", "py39-tensorflow-213", "${posargs}" -test.dependsOn "testPy39tensorflow-213" -postCommitPyDep.dependsOn "testPy39tensorflow-213" +toxTask "testPy39tensorflow-212", "py39-tensorflow-212", "${posargs}" +test.dependsOn "testPy39tensorflow-212" +postCommitPyDep.dependsOn "testPy39tensorflow-212" // Create a test task for each minor version of transformers toxTask "testPy39transformers-428", "py39-transformers-428", "${posargs}" diff --git a/sdks/python/tox.ini b/sdks/python/tox.ini index e8402b87055f4..15106ad59f1cb 100644 --- a/sdks/python/tox.ini +++ b/sdks/python/tox.ini @@ -388,14 +388,14 @@ commands = # Run all ONNX unit tests pytest -o junit_suite_name={envname} --junitxml=pytest_{envname}.xml -n 6 -m uses_onnx {posargs} -[testenv:py39-tensorflow-213] +[testenv:py39-tensorflow-212] deps = 213: - tensorflow>=2.13rc1,<2.14 + tensorflow>=2.12rc1,<2.13 # Help pip resolve conflict with typing-extensions for old version of TF https://github.com/apache/beam/issues/30852 pydantic<2.7 protobuf==4.25.5 -extras = test,gcp +extras = test,gcp,ml_test commands = # Log tensorflow version for debugging /bin/sh -c "pip freeze | grep -E tensorflow" From 9fcd6380b15031839e23abd0748eee9cc56b10c1 Mon Sep 17 00:00:00 2001 From: Jack McCluskey Date: Fri, 11 Oct 2024 12:32:00 -0400 Subject: [PATCH 09/11] fix transformers tests --- sdks/python/tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdks/python/tox.ini b/sdks/python/tox.ini index 15106ad59f1cb..91ccca0e96319 100644 --- a/sdks/python/tox.ini +++ b/sdks/python/tox.ini @@ -436,7 +436,7 @@ deps = torch>=1.9.0,<1.14.0 tensorflow==2.12.0 protobuf==4.25.5 -extras = test,gcp +extras = test,gcp,ml_test commands = # Log transformers and its dependencies version for debugging /bin/sh -c "pip freeze | grep -E transformers" From 99b690676f4323fa81ccaeee435bb803ac42de5c Mon Sep 17 00:00:00 2001 From: Jack McCluskey Date: Fri, 11 Oct 2024 13:32:02 -0400 Subject: [PATCH 10/11] tweak deps for transformers --- sdks/python/tox.ini | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/sdks/python/tox.ini b/sdks/python/tox.ini index 91ccca0e96319..4b45ea9019406 100644 --- a/sdks/python/tox.ini +++ b/sdks/python/tox.ini @@ -390,7 +390,7 @@ commands = [testenv:py39-tensorflow-212] deps = - 213: + 212: tensorflow>=2.12rc1,<2.13 # Help pip resolve conflict with typing-extensions for old version of TF https://github.com/apache/beam/issues/30852 pydantic<2.7 @@ -423,19 +423,13 @@ commands = deps = 428: transformers>=4.28.0,<4.29.0 - torch>=1.9.0,<1.14.0 - tensorflow==2.12.0 - protobuf==4.25.5 429: transformers>=4.29.0,<4.30.0 - torch>=1.9.0,<1.14.0 - tensorflow==2.12.0 - protobuf==4.25.5 430: transformers>=4.30.0,<4.31.0 - torch>=1.9.0,<1.14.0 - tensorflow==2.12.0 - protobuf==4.25.5 + torch>=1.9.0,<1.14.0 + tensorflow==2.12.0 + protobuf==4.25.5 extras = test,gcp,ml_test commands = # Log transformers and its dependencies version for debugging From 00e6cfc5853e7635da4f2614d051d90335147f15 Mon Sep 17 00:00:00 2001 From: Jack McCluskey Date: Fri, 11 Oct 2024 15:14:37 -0400 Subject: [PATCH 11/11] whitespace --- sdks/python/tox.ini | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sdks/python/tox.ini b/sdks/python/tox.ini index 4b45ea9019406..6af4f6c610f52 100644 --- a/sdks/python/tox.ini +++ b/sdks/python/tox.ini @@ -421,12 +421,9 @@ commands = [testenv:py{39,310}-transformers-{428,429,430}] deps = - 428: - transformers>=4.28.0,<4.29.0 - 429: - transformers>=4.29.0,<4.30.0 - 430: - transformers>=4.30.0,<4.31.0 + 428: transformers>=4.28.0,<4.29.0 + 429: transformers>=4.29.0,<4.30.0 + 430: transformers>=4.30.0,<4.31.0 torch>=1.9.0,<1.14.0 tensorflow==2.12.0 protobuf==4.25.5