You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by vt...@apache.org on 2025/07/26 14:56:07 UTC
(beam) branch fix-postcommit-python updated (4896270571c -> 1684d7a3f38)
This is an automated email from the ASF dual-hosted git repository.
vterentev pushed a change to branch fix-postcommit-python
in repository https://gitbox.apache.org/repos/asf/beam.git
discard 4896270571c google-genai 1.27.0
discard d309c70484e Revert back
discard ac3e02919c5 google-genai 1.27.0
discard 3fb5a27b449 Add import
discard 4bccd9eaa52 Update gemini process fn
discard 7799a86104a Fix debezium port type
discard 7126c1a99af Fix debezium output type
discard b371f80ccff Set grpcio version to 1.65.5
discard d7821085725 Set grpcio version to 1.62.1
discard 271e08f158c Revert "Set grpcio version to 1.73.1"
discard 6ff05d47c48 Revert "Set grpcio version to 1.67.1"
discard c544e9e759f Set grpcio version to 1.67.1
discard d11dcaca504 Set grpcio version to 1.73.1
new d9cd3366816 Fix debezium port type
new 1684d7a3f38 Fix gemini post processor
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (4896270571c)
\
N -- N -- N refs/heads/fix-postcommit-python (1684d7a3f38)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../examples/inference/gemini_text_classification.py | 10 ++++++++++
sdks/python/container/py310/base_image_requirements.txt | 2 +-
sdks/python/container/py310/ml_image_requirements.txt | 2 +-
sdks/python/container/py311/base_image_requirements.txt | 2 +-
sdks/python/container/py311/ml_image_requirements.txt | 2 +-
sdks/python/container/py312/base_image_requirements.txt | 2 +-
sdks/python/container/py312/ml_image_requirements.txt | 2 +-
sdks/python/container/py39/base_image_requirements.txt | 2 +-
sdks/python/container/py39/ml_image_requirements.txt | 2 +-
9 files changed, 18 insertions(+), 8 deletions(-)
(beam) 01/02: Fix debezium port type
Posted by vt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vterentev pushed a commit to branch fix-postcommit-python
in repository https://gitbox.apache.org/repos/asf/beam.git
commit d9cd33668166acb751f108473f1e4299d3f750eb
Author: Vitaly Terentyev <vi...@akvelon.com>
AuthorDate: Thu Jul 24 16:33:38 2025 +0400
Fix debezium port type
---
sdks/python/apache_beam/io/debezium.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sdks/python/apache_beam/io/debezium.py b/sdks/python/apache_beam/io/debezium.py
index 9e93801852c..26516fa4e4b 100644
--- a/sdks/python/apache_beam/io/debezium.py
+++ b/sdks/python/apache_beam/io/debezium.py
@@ -155,7 +155,7 @@ class ReadFromDebezium(PTransform):
username=username,
password=password,
host=host,
- port=port,
+ port=str(port),
max_number_of_records=max_number_of_records,
connection_properties=connection_properties)
self.expansion_service = expansion_service or default_io_expansion_service()
(beam) 02/02: Fix gemini post processor
Posted by vt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vterentev pushed a commit to branch fix-postcommit-python
in repository https://gitbox.apache.org/repos/asf/beam.git
commit 1684d7a3f381662f3ec21bf409e551b8ca7d6a2d
Author: Vitaly Terentyev <vi...@akvelon.com>
AuthorDate: Sat Jul 26 18:55:53 2025 +0400
Fix gemini post processor
---
.../examples/inference/gemini_text_classification.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/sdks/python/apache_beam/examples/inference/gemini_text_classification.py b/sdks/python/apache_beam/examples/inference/gemini_text_classification.py
index e82f407374a..ea7ff235716 100644
--- a/sdks/python/apache_beam/examples/inference/gemini_text_classification.py
+++ b/sdks/python/apache_beam/examples/inference/gemini_text_classification.py
@@ -67,6 +67,16 @@ def parse_known_args(argv):
class PostProcessor(beam.DoFn):
def process(self, element: PredictionResult) -> Iterable[str]:
+ if hasattr(element, "text"):
+ yield element.text
+ return
+
+ inference = getattr(element, "inference", None)
+
+ if hasattr(inference, "text"):
+ yield inference.text
+ return
+
yield "Input: " + str(element.example) + " Output: " + str(
element.inference[1][0].content.parts[0].text)