This is an automated email from the ASF dual-hosted git repository.

Amar3tto pushed a commit to branch fix-inference-ml
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/fix-inference-ml by this push:
     new 3eb5818fd34 Test GPU pipelines
3eb5818fd34 is described below

commit 3eb5818fd34a201929015af32d397014b1703b37
Author: Vitaly Terentyev <[email protected]>
AuthorDate: Thu Aug 20 11:51:42 2026 +0400

    Test GPU pipelines
---
 .../beam_Inference_Python_Benchmarks_Dataflow.yml  | 137 +++++++++++++++++++--
 .../examples/inference/pytorch_image_captioning.py |   1 +
 .../inference/pytorch_image_object_detection.py    |   1 +
 .../inference/pytorch_imagenet_rightfit.py         |   1 +
 4 files changed, 132 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/beam_Inference_Python_Benchmarks_Dataflow.yml 
b/.github/workflows/beam_Inference_Python_Benchmarks_Dataflow.yml
index 529e09c436c..c8ef3830300 100644
--- a/.github/workflows/beam_Inference_Python_Benchmarks_Dataflow.yml
+++ b/.github/workflows/beam_Inference_Python_Benchmarks_Dataflow.yml
@@ -107,6 +107,72 @@ jobs:
       # The env variables are created and populated in the 
test-arguments-action as 
"<github.job>_test_arguments_<argument_file_paths_index>"
       - name: get current time
         run: echo "NOW_UTC=$(date '+%m%d%H%M%S' --utc)" >> $GITHUB_ENV
+      - name: run PyTorch Image Object Detection Faster R-CNN ResNet-50 Batch 
GPU
+        uses: ./.github/actions/gradle-command-self-hosted-action
+        timeout-minutes: 180
+        with:
+          gradle-command: :sdks:python:apache_beam:testing:load_tests:run
+          arguments: |
+            
-PloadTest.mainClass=apache_beam.testing.benchmarks.inference.pytorch_image_object_detection_benchmarks
 \
+            -Prunner=DataflowRunner \
+            -PpythonVersion=3.10 \
+            
-PloadTest.requirementsTxtFile=apache_beam/ml/inference/pytorch_image_object_detection_requirements.txt
 \
+            '-PloadTest.args=${{ 
env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_12 }} --device=GPU 
--worker_accelerator=type=nvidia-tesla-t4,count=1,install-nvidia-driver=true 
--sdk_location=container 
--sdk_container_image=us.gcr.io/apache-beam-testing/python-postcommit-it/tensor_rt:latest
 --mode=batch 
--job_name=benchmark-tests-pytorch-image-object-detection-batch-${{env.NOW_UTC}}
 --metrics_table=torch_inference_image_object_detection_batch_gpu 
--output_table=apache-beam-t [...]
+      - name: run PyTorch Image Captioning BLIP + CLIP Batch GPU
+        uses: ./.github/actions/gradle-command-self-hosted-action
+        timeout-minutes: 180
+        with:
+          gradle-command: :sdks:python:apache_beam:testing:load_tests:run
+          arguments: |
+            
-PloadTest.mainClass=apache_beam.testing.benchmarks.inference.pytorch_image_captioning_benchmarks
 \
+            -Prunner=DataflowRunner \
+            -PpythonVersion=3.10 \
+            
-PloadTest.requirementsTxtFile=apache_beam/ml/inference/pytorch_image_captioning_requirements.txt
 \
+            '-PloadTest.args=${{ 
env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_13 }} --device=GPU 
--worker_accelerator=type=nvidia-tesla-t4,count=1,install-nvidia-driver=true 
--sdk_location=container 
--sdk_container_image=us.gcr.io/apache-beam-testing/python-postcommit-it/tensor_rt:latest
 --mode=batch 
--job_name=benchmark-tests-pytorch-image-captioning-batch-${{env.NOW_UTC}} 
--metrics_table=torch_inference_image_captioning_batch_gpu 
--output_table=apache-beam-testing.beam_ [...]
+      - name: run PyTorch Image Object Detection Faster R-CNN ResNet-50 
Streaming CPU
+        uses: ./.github/actions/gradle-command-self-hosted-action
+        timeout-minutes: 180
+        with:
+          gradle-command: :sdks:python:apache_beam:testing:load_tests:run
+          arguments: |
+            
-PloadTest.mainClass=apache_beam.testing.benchmarks.inference.pytorch_image_object_detection_benchmarks
 \
+            -Prunner=DataflowRunner \
+            -PpythonVersion=3.10 \
+            
-PloadTest.requirementsTxtFile=apache_beam/ml/inference/pytorch_image_object_detection_requirements.txt
 \
+            '-PloadTest.args=${{ 
env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_12 }} --device=CPU 
--mode=streaming 
--job_name=benchmark-tests-pytorch-image-object-detection-streaming-${{env.NOW_UTC}}
 --metrics_table=torch_inference_image_object_detection_streaming_cpu 
--output_table=apache-beam-testing.beam_run_inference.result_torch_inference_image_object_detection_streaming_cpu'
 \
+      - name: run PyTorch Image Captioning BLIP + CLIP Streaming CPU
+        uses: ./.github/actions/gradle-command-self-hosted-action
+        timeout-minutes: 180
+        with:
+          gradle-command: :sdks:python:apache_beam:testing:load_tests:run
+          arguments: |
+            
-PloadTest.mainClass=apache_beam.testing.benchmarks.inference.pytorch_image_captioning_benchmarks
 \
+            -Prunner=DataflowRunner \
+            -PpythonVersion=3.10 \
+            
-PloadTest.requirementsTxtFile=apache_beam/ml/inference/pytorch_image_captioning_requirements.txt
 \
+            '-PloadTest.args=${{ 
env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_13 }} --device=CPU 
--mode=streaming 
--job_name=benchmark-tests-pytorch-image-captioning-streaming-${{env.NOW_UTC}} 
--metrics_table=torch_inference_image_captioning_streaming_cpu 
--output_table=apache-beam-testing.beam_run_inference.result_torch_inference_image_captioning_streaming_cpu'
+      - name: run PyTorch Image Object Detection Faster R-CNN ResNet-50 
Streaming GPU
+        uses: ./.github/actions/gradle-command-self-hosted-action
+        timeout-minutes: 180
+        with:
+          gradle-command: :sdks:python:apache_beam:testing:load_tests:run
+          arguments: |
+            
-PloadTest.mainClass=apache_beam.testing.benchmarks.inference.pytorch_image_object_detection_benchmarks
 \
+            -Prunner=DataflowRunner \
+            -PpythonVersion=3.10 \
+            
-PloadTest.requirementsTxtFile=apache_beam/ml/inference/pytorch_image_object_detection_requirements.txt
 \
+            '-PloadTest.args=${{ 
env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_12 }} --device=GPU 
--worker_accelerator=type=nvidia-tesla-t4,count=1,install-nvidia-driver=true 
--sdk_location=container 
--sdk_container_image=us.gcr.io/apache-beam-testing/python-postcommit-it/tensor_rt:latest
 --mode=streaming 
--job_name=benchmark-tests-pytorch-image-object-detection-streaming-${{env.NOW_UTC}}
 --metrics_table=torch_inference_image_object_detection_streaming_gpu 
--output_table=a [...]
+      - name: run PyTorch Image Captioning BLIP + CLIP Streaming GPU
+        uses: ./.github/actions/gradle-command-self-hosted-action
+        timeout-minutes: 180
+        with:
+          gradle-command: :sdks:python:apache_beam:testing:load_tests:run
+          arguments: |
+            
-PloadTest.mainClass=apache_beam.testing.benchmarks.inference.pytorch_image_captioning_benchmarks
 \
+            -Prunner=DataflowRunner \
+            -PpythonVersion=3.10 \
+            
-PloadTest.requirementsTxtFile=apache_beam/ml/inference/pytorch_image_captioning_requirements.txt
 \
+            '-PloadTest.args=${{ 
env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_13 }} --device=GPU 
--worker_accelerator=type=nvidia-tesla-t4,count=1,install-nvidia-driver=true 
--sdk_location=container 
--sdk_container_image=us.gcr.io/apache-beam-testing/python-postcommit-it/tensor_rt:latest
 --mode=streaming 
--job_name=benchmark-tests-pytorch-image-captioning-streaming-${{env.NOW_UTC}} 
--metrics_table=torch_inference_image_captioning_streaming_gpu 
--output_table=apache-beam-t [...]
       - name: run PyTorch Image Classification EfficientNet-B0 Streaming 
(Right-fitting) CPU
         uses: ./.github/actions/gradle-command-self-hosted-action
         timeout-minutes: 180
@@ -129,25 +195,80 @@ jobs:
             -PpythonVersion=3.10 \
             
-PloadTest.requirementsTxtFile=apache_beam/ml/inference/pytorch_rightfit_requirements.txt
 \
             '-PloadTest.args=${{ 
env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_11 }} --device=CPU 
--experiments=enable_streaming_rightfitting --mode=streaming 
--job_name=benchmark-tests-pytorch-imagenet-rightfit-streaming-${{env.NOW_UTC}} 
--metrics_table=torch_inference_imagenet_stream_rightfit_once_cpu 
--output_table=apache-beam-testing.beam_run_inference.result_torch_inference_imagenet_stream_rightfit_once_cpu'
 \
-      - name: run PyTorch Image Object Detection Faster R-CNN ResNet-50 Batch 
CPU
+      - name: run PyTorch Image Classification EfficientNet-B0 Streaming 
(Right-fitting) GPU
         uses: ./.github/actions/gradle-command-self-hosted-action
         timeout-minutes: 180
         with:
           gradle-command: :sdks:python:apache_beam:testing:load_tests:run
           arguments: |
-            
-PloadTest.mainClass=apache_beam.testing.benchmarks.inference.pytorch_image_object_detection_benchmarks
 \
+            
-PloadTest.mainClass=apache_beam.testing.benchmarks.inference.pytorch_imagenet_rightfit_benchmarks
 \
             -Prunner=DataflowRunner \
             -PpythonVersion=3.10 \
-            
-PloadTest.requirementsTxtFile=apache_beam/ml/inference/pytorch_image_object_detection_requirements.txt
 \
-            '-PloadTest.args=${{ 
env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_12 }} --device=CPU 
--mode=batch 
--job_name=benchmark-tests-pytorch-image-object-detection-batch-${{env.NOW_UTC}}
 --metrics_table=torch_inference_image_object_detection_batch_cpu 
--output_table=apache-beam-testing.beam_run_inference.result_torch_inference_image_object_detection_batch_cpu'
 \
-      - name: run PyTorch Image Captioning BLIP + CLIP Streaming CPU
+            
-PloadTest.requirementsTxtFile=apache_beam/ml/inference/pytorch_rightfit_requirements.txt
 \
+            '-PloadTest.args=${{ 
env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_11 }} --device=GPU 
--experiments=enable_streaming_rightfitting,worker_accelerator=type:nvidia-tesla-t4;count:1;install-nvidia-driver:5xx
 --sdk_location=container 
--sdk_container_image=us.gcr.io/apache-beam-testing/python-postcommit-it/tensor_rt:latest
 --mode=streaming 
--job_name=benchmark-tests-pytorch-imagenet-rightfit-streaming-${{env.NOW_UTC}} 
--metrics_table=torch_inference_imagenet_stream_r [...]
+      - name: run PyTorch Image Classification EfficientNet-B0 Streaming 
(Right-fitting Exactly-once) GPU
         uses: ./.github/actions/gradle-command-self-hosted-action
         timeout-minutes: 180
         with:
           gradle-command: :sdks:python:apache_beam:testing:load_tests:run
           arguments: |
-            
-PloadTest.mainClass=apache_beam.testing.benchmarks.inference.pytorch_image_captioning_benchmarks
 \
+            
-PloadTest.mainClass=apache_beam.testing.benchmarks.inference.pytorch_imagenet_rightfit_benchmarks
 \
             -Prunner=DataflowRunner \
             -PpythonVersion=3.10 \
-            
-PloadTest.requirementsTxtFile=apache_beam/ml/inference/pytorch_image_captioning_requirements.txt
 \
-            '-PloadTest.args=${{ 
env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_13 }} --device=CPU 
--mode=streaming 
--job_name=benchmark-tests-pytorch-image-captioning-streaming-${{env.NOW_UTC}} 
--metrics_table=torch_inference_image_captioning_streaming_cpu 
--output_table=apache-beam-testing.beam_run_inference.result_torch_inference_image_captioning_streaming_cpu'
+            
-PloadTest.requirementsTxtFile=apache_beam/ml/inference/pytorch_rightfit_requirements.txt
 \
+            '-PloadTest.args=${{ 
env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_11 }} --device=GPU 
--experiments=enable_streaming_rightfitting,worker_accelerator=type:nvidia-tesla-t4;count:1;install-nvidia-driver:5xx
 --sdk_location=container 
--sdk_container_image=us.gcr.io/apache-beam-testing/python-postcommit-it/tensor_rt:latest
 --mode=streaming 
--job_name=benchmark-tests-pytorch-imagenet-rightfit-streaming-${{env.NOW_UTC}} 
--metrics_table=torch_inference_imagenet_stream_r [...]
+      - name: run MLTransform Generate Vocab Batch
+        uses: ./.github/actions/gradle-command-self-hosted-action
+        timeout-minutes: 180
+        with:
+          gradle-command: :sdks:python:apache_beam:testing:load_tests:run
+          arguments: |
+            
-PloadTest.mainClass=apache_beam.testing.benchmarks.inference.mltransform_generate_vocab_benchmark
 \
+            -Prunner=DataflowRunner \
+            -PpythonVersion=3.10 \
+            
-PloadTest.requirementsTxtFile=apache_beam/examples/ml_transform/mltransform_generate_vocab_requirements.txt
 \
+            '-PloadTest.args=${{ 
env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_14 }} 
--job_name=benchmark-tests-mltransform-generate-vocab-batch-${{env.NOW_UTC}} 
--artifact_location=gs://temp-storage-for-perf-tests/mltransform/vocab_artifacts_${{env.NOW_UTC}}
 
--output_vocab=gs://temp-storage-for-perf-tests/mltransform/vocab_outputs/mltransform_generate_vocab_batch_${{env.NOW_UTC}}'
+      - name: run MLTransform One-Hot Encoding Batch
+        uses: ./.github/actions/gradle-command-self-hosted-action
+        timeout-minutes: 180
+        with:
+          gradle-command: :sdks:python:apache_beam:testing:load_tests:run
+          arguments: |
+            
-PloadTest.mainClass=apache_beam.testing.benchmarks.inference.mltransform_one_hot_encoding_benchmark
 \
+            -Prunner=DataflowRunner \
+            -PpythonVersion=3.10 \
+            
-PloadTest.requirementsTxtFile=apache_beam/examples/ml_transform/mltransform_one_hot_encoding_requirements.txt
 \
+            '-PloadTest.args=${{ 
env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_15 }} 
--autoscaling_algorithm=NONE --metrics_table=mltransform_one_hot_encoding_batch 
--influx_measurement=mltransform_one_hot_encoding_batch 
--job_name=benchmark-tests-mltransform-one-hot-encoding-batch-${{env.NOW_UTC}} 
--output_file=gs://temp-storage-for-end-to-end-tests/mltransform/one_hot_output_${{env.NOW_UTC}}
 
--artifact_location=gs://temp-storage-for-end-to-end-tests/mltransform/artifacts
 [...]
+      - name: run MLTransform Image Embedding GPU Batch
+        uses: ./.github/actions/gradle-command-self-hosted-action
+        timeout-minutes: 180
+        with:
+          gradle-command: :sdks:python:apache_beam:testing:load_tests:run
+          arguments: |
+            
-PloadTest.mainClass=apache_beam.testing.benchmarks.inference.mltransform_image_embedding_benchmark
 \
+            -Prunner=DataflowRunner \
+            -PpythonVersion=3.10 \
+            
-PloadTest.requirementsTxtFile=apache_beam/ml/transforms/mltransform_embedding_tests_requirements.txt
 \
+            '-PloadTest.args=${{ 
env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_16 }} 
--artifact_location=gs://temp-storage-for-perf-tests/loadtests/mltransform_image_embedding_gpu/artifacts-${{env.NOW_UTC}}
 
--job_name=benchmark-tests-mltransform-image-embedding-gpu-batch-${{env.NOW_UTC}}'
+      - name: run MLTransform Text Embedding Batch
+        uses: ./.github/actions/gradle-command-self-hosted-action
+        timeout-minutes: 180
+        with:
+          gradle-command: :sdks:python:apache_beam:testing:load_tests:run
+          arguments: |
+            
-PloadTest.mainClass=apache_beam.testing.benchmarks.inference.mltransform_text_embedding_benchmark
 \
+            -Prunner=DataflowRunner \
+            -PpythonVersion=3.10 \
+            
-PloadTest.requirementsTxtFile=apache_beam/ml/transforms/mltransform_embedding_tests_requirements.txt
 \
+            '-PloadTest.args=${{ 
env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_17 }} 
--output=gs://temp-storage-for-perf-tests/loadtests/mltransform_text_embedding/results-${{env.NOW_UTC}}
 
--artifact_location=gs://temp-storage-for-perf-tests/loadtests/mltransform_text_embedding/artifacts-${{env.NOW_UTC}}
 --job_name=benchmark-tests-mltransform-text-embedding-batch-${{env.NOW_UTC}}'
+      - name: run MLTransform Image Embedding CPU Batch
+        uses: ./.github/actions/gradle-command-self-hosted-action
+        timeout-minutes: 180
+        with:
+          gradle-command: :sdks:python:apache_beam:testing:load_tests:run
+          arguments: |
+            
-PloadTest.mainClass=apache_beam.testing.benchmarks.inference.mltransform_image_embedding_benchmark
 \
+            -Prunner=DataflowRunner \
+            -PpythonVersion=3.10 \
+            
-PloadTest.requirementsTxtFile=apache_beam/ml/transforms/mltransform_embedding_tests_requirements.txt
 \
+            '-PloadTest.args=${{ 
env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_18 }} 
--artifact_location=gs://temp-storage-for-perf-tests/loadtests/mltransform_image_embedding_cpu/artifacts-${{env.NOW_UTC}}
 
--job_name=benchmark-tests-mltransform-image-embedding-cpu-batch-${{env.NOW_UTC}}'
diff --git 
a/sdks/python/apache_beam/examples/inference/pytorch_image_captioning.py 
b/sdks/python/apache_beam/examples/inference/pytorch_image_captioning.py
index 9340a816882..996058cc6b8 100644
--- a/sdks/python/apache_beam/examples/inference/pytorch_image_captioning.py
+++ b/sdks/python/apache_beam/examples/inference/pytorch_image_captioning.py
@@ -636,6 +636,7 @@ def run(
   finally:
     try:
       result.cancel()
+      result.wait_until_finish(duration=600000)  # up to 10 min to settle 
cancel
     except Exception:
       logging.debug("Failed to cancel pipeline result.", exc_info=True)
 
diff --git 
a/sdks/python/apache_beam/examples/inference/pytorch_image_object_detection.py 
b/sdks/python/apache_beam/examples/inference/pytorch_image_object_detection.py
index dc0a915631d..6e49938c14a 100644
--- 
a/sdks/python/apache_beam/examples/inference/pytorch_image_object_detection.py
+++ 
b/sdks/python/apache_beam/examples/inference/pytorch_image_object_detection.py
@@ -500,6 +500,7 @@ def run(
   finally:
     try:
       result.cancel()
+      result.wait_until_finish(duration=600000)  # up to 10 min to settle 
cancel
     except Exception:
       logging.debug("Failed to cancel pipeline result.", exc_info=True)
 
diff --git 
a/sdks/python/apache_beam/examples/inference/pytorch_imagenet_rightfit.py 
b/sdks/python/apache_beam/examples/inference/pytorch_imagenet_rightfit.py
index dee2d3b0d0e..1efb31fa240 100644
--- a/sdks/python/apache_beam/examples/inference/pytorch_imagenet_rightfit.py
+++ b/sdks/python/apache_beam/examples/inference/pytorch_imagenet_rightfit.py
@@ -520,6 +520,7 @@ def run(
   finally:
     try:
       result.cancel()
+      result.wait_until_finish(duration=600000)  # up to 10 min to settle 
cancel
     except Exception:
       logging.debug("Failed to cancel pipeline result.", exc_info=True)
 

Reply via email to