gemini-code-assist[bot] commented on code in PR #38358:
URL: https://github.com/apache/beam/pull/38358#discussion_r3177594848
##########
sdks/python/setup.py:
##########
@@ -656,7 +657,7 @@ def get_portability_package_data():
],
'ml_cpu': [
'tensorflow>=2.12.0',
- 'torch==2.8.0+cpu',
+ 'torch==2.8.0',
Review Comment:

There is an inconsistency between this pin and the generated requirements
for Python 3.12 (`sdks/python/container/ml/py312/base_image_requirements.txt`),
which now uses `torch==2.8.0+cpu`. Removing the `+cpu` suffix here while adding
it in the frozen requirements can lead to installation issues or mismatched
environments in the ML containers.
```suggestion
'torch==2.8.0+cpu',
```
##########
sdks/python/setup.py:
##########
@@ -206,13 +206,13 @@ def cythonize(*args, **kwargs):
]
ml_adk_dependency = [
- 'google-adk==1.28.1',
+ 'google-adk==1.32.0',
# proto-plus<1.24 caps protobuf<5; opentelemetry-proto (via ADK) needs
# protobuf>=5. Scoped here so the main dependency list stays broader.
'proto-plus>=1.26.1,<2',
- 'opentelemetry-api==1.37.0',
- 'opentelemetry-sdk==1.37.0',
- 'opentelemetry-exporter-otlp-proto-http==1.37.0',
+ 'opentelemetry-api==1.40.0',
+ 'opentelemetry-sdk==1.40.0',
+ 'opentelemetry-exporter-otlp-proto-http==1.40.0',
Review Comment:

The `opentelemetry` packages are pinned to `1.40.0` here, but the generated
requirements files (e.g., in
`sdks/python/container/ml/py310/base_image_requirements.txt`) have been updated
to `1.41.1`. These versions should be aligned to prevent `pip` from attempting
to downgrade the packages when installing the ML extras in the Beam containers.
```suggestion
'opentelemetry-api==1.41.1',
'opentelemetry-sdk==1.41.1',
'opentelemetry-exporter-otlp-proto-http==1.41.1',
```
##########
sdks/python/container/ml/py312/gpu_image_requirements.txt:
##########
@@ -269,44 +284,41 @@ sortedcontainers==2.4.0
soundfile==0.13.1
soupsieve==2.8.3
soxr==1.0.0
-SQLAlchemy==2.0.48
+SQLAlchemy==2.0.49
sqlalchemy_pytds==1.0.2
sqlparse==0.5.5
starlette==0.52.1
sympy==1.14.0
-tenacity==8.5.0
-tensorboard==2.20.0
-tensorboard-data-server==0.7.2
-tensorflow==2.20.0
-tensorflow-cpu-aws==2.20.0;platform_machine=="aarch64"
+tenacity==9.1.4
+tensorflow==2.21.0
+tensorflow-cpu-aws==2.21.0;platform_machine=="aarch64"
termcolor==3.3.0
-testcontainers==4.14.1
+testcontainers==4.14.2
threadpoolctl==3.6.0
tiktoken==0.12.0
tokenizers==0.21.4
-torch==2.8.0
+torch==2.7.1
Review Comment:

`torch` is being downgraded to `2.7.1` in the Python 3.12 GPU requirements,
while the CPU version is at `2.8.0` and `setup.py` has been updated to allow
versions up to `2.9.0`. This downgrade seems inconsistent with the overall goal
of the PR to update versions.
```
torch==2.8.0
```
##########
sdks/python/container/ml/py312/gpu_image_requirements.txt:
##########
@@ -269,44 +284,41 @@ sortedcontainers==2.4.0
soundfile==0.13.1
soupsieve==2.8.3
soxr==1.0.0
-SQLAlchemy==2.0.48
+SQLAlchemy==2.0.49
sqlalchemy_pytds==1.0.2
sqlparse==0.5.5
starlette==0.52.1
sympy==1.14.0
-tenacity==8.5.0
-tensorboard==2.20.0
-tensorboard-data-server==0.7.2
-tensorflow==2.20.0
-tensorflow-cpu-aws==2.20.0;platform_machine=="aarch64"
+tenacity==9.1.4
+tensorflow==2.21.0
+tensorflow-cpu-aws==2.21.0;platform_machine=="aarch64"
termcolor==3.3.0
-testcontainers==4.14.1
+testcontainers==4.14.2
threadpoolctl==3.6.0
tiktoken==0.12.0
tokenizers==0.21.4
-torch==2.8.0
+torch==2.7.1
torchaudio==2.7.1
torchvision==0.22.1
tqdm==4.67.3
transformers==4.55.4
triton==3.3.1
-typer==0.24.1
+typer==0.25.1
typing-inspection==0.4.2
typing_extensions==4.15.0
-tzdata==2025.3
+tzdata==2026.2
uritemplate==4.2.0
urllib3==2.6.3
-uvicorn==0.41.0
+uvicorn==0.46.0
uvloop==0.22.1
virtualenv-clone==0.5.7
vllm==0.10.1.1
watchfiles==1.1.1
websockets==16.0
-Werkzeug==3.1.6
-wheel==0.46.3
+wheel==0.47.0
wrapt==2.1.2
xformers==0.0.31
-xgrammar==0.1.32
+xgrammar==0.1.21
Review Comment:

`xgrammar` is being downgraded from `0.1.32` to `0.1.21`. This appears to be
a regression unless it was done to resolve a specific dependency conflict or
build issue.
```
xgrammar==0.1.32
```
##########
sdks/python/setup.py:
##########
@@ -500,9 +500,10 @@ def get_portability_package_data():
'requests_mock>=1.7,<2.0',
# google-adk 1.28+ requires tenacity>=9,<10 (conflicts with <9).
'tenacity>=8.0.0,<10',
Review Comment:

The comment on line 501 indicates that `google-adk 1.28+` requires
`tenacity>=9`. Since `google-adk` is being updated to `1.32.0` in this PR, the
lower bound for `tenacity` should be updated to `9.0.0` to maintain consistency
and avoid potential runtime conflicts.
```suggestion
'tenacity>=9.0.0,<10',
```
##########
sdks/python/container/ml/py310/base_image_requirements.txt:
##########
@@ -125,7 +125,7 @@ Js2Py==0.74
jsonpickle==3.4.2
jsonschema==4.26.0
jsonschema-specifications==2025.9.1
-keras==3.13.2
+keras==3.12.1
Review Comment:

`keras` is being downgraded to `3.12.1` for Python 3.10, whereas it is being
upgraded to `3.14.0` for Python 3.11 through 3.13. Unless there is a specific
compatibility issue necessitating this downgrade on Python 3.10, it should be
aligned with the other versions.
```
keras==3.14.0
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]