diff --git a/.github/workflows/beam_Inference_Python_Benchmarks_Dataflow.yml b/.github/workflows/beam_Inference_Python_Benchmarks_Dataflow.yml index ae52cbb68e17..0ef781b67ff4 100644 --- a/.github/workflows/beam_Inference_Python_Benchmarks_Dataflow.yml +++ b/.github/workflows/beam_Inference_Python_Benchmarks_Dataflow.yml @@ -1,4 +1,4 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more +# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 @@ -108,134 +108,135 @@ jobs: image_tag: ${{ github.sha }} - name: Run VLLM Gemma Batch Test uses: ./.github/actions/gradle-command-self-hosted-action - timeout-minutes: 180 + timeout-minutes: 270 with: gradle-command: :sdks:python:apache_beam:testing:load_tests:run arguments: | - -PloadTest.mainClass=apache_beam.testing.benchmarks.inference.vllm_gemma_benchmarks \ - -Prunner=DataflowRunner \ - -PsdkLocationOverride=false \ - -PpythonVersion=3.10 \ - -PloadTest.requirementsTxtFile=apache_beam/ml/inference/vllm_tests_requirements.txt '-PloadTest.args=${{ env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_8 }} --mode=batch --job_name=benchmark-tests-vllm-with-gemma-2b-it-batch-${{env.NOW_UTC}} --sdk_container_image=${{ steps.build_vllm_image.outputs.image_url }}' + -PloadTest.mainClass=apache_beam.testing.benchmarks.inference.vllm_gemma_benchmarks + -Prunner=DataflowRunner + -PsdkLocationOverride=false + -PpythonVersion=3.10 + -PloadTest.requirementsTxtFile=apache_beam/ml/inference/vllm_tests_requirements.txt + -PloadTest.args="${{ env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_8 }} --mode=batch --job_name=benchmark-tests-vllm-with-gemma-2b-it-batch-${{env.NOW_UTC}} --sdk_container_image=${{ steps.build_vllm_image.outputs.image_url }}" - name: run Pytorch Sentiment Streaming using Hugging Face distilbert-base-uncased model 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_sentiment_benchmarks \ - -Prunner=DataflowRunner \ - -PpythonVersion=3.10 \ - -PloadTest.requirementsTxtFile=apache_beam/ml/inference/torch_tests_requirements.txt \ - '-PloadTest.args=${{ env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_6 }} --mode=streaming --job_name=benchmark-tests-pytorch-sentiment-distilbert-base-uncased-streaming-${{env.NOW_UTC}} --output_table=apache-beam-testing.beam_run_inference.result_sentiment_distilbert_base_uncased' \ + -PloadTest.mainClass=apache_beam.testing.benchmarks.inference.pytorch_sentiment_benchmarks + -Prunner=DataflowRunner + -PpythonVersion=3.10 + -PloadTest.requirementsTxtFile=apache_beam/ml/inference/torch_tests_requirements.txt + -PloadTest.args="${{ env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_6 }} --mode=streaming --job_name=benchmark-tests-pytorch-sentiment-distilbert-base-uncased-streaming-${{env.NOW_UTC}} --output_table=apache-beam-testing.beam_run_inference.result_sentiment_distilbert_base_uncased" - name: run Pytorch Sentiment Batch using Hugging Face distilbert-base-uncased model 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_sentiment_benchmarks \ - -Prunner=DataflowRunner \ - -PpythonVersion=3.10 \ - -PloadTest.requirementsTxtFile=apache_beam/ml/inference/torch_tests_requirements.txt \ - '-PloadTest.args=${{ env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_7 }} --mode=batch --job_name=benchmark-tests-pytorch-sentiment-distilbert-base-uncased-batch-${{env.NOW_UTC}} --output_table=apache-beam-testing.beam_run_inference.result_sentiment_distilbert_base_uncased' \ + -PloadTest.mainClass=apache_beam.testing.benchmarks.inference.pytorch_sentiment_benchmarks + -Prunner=DataflowRunner + -PpythonVersion=3.10 + -PloadTest.requirementsTxtFile=apache_beam/ml/inference/torch_tests_requirements.txt + -PloadTest.args="${{ env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_7 }} --mode=batch --job_name=benchmark-tests-pytorch-sentiment-distilbert-base-uncased-batch-${{env.NOW_UTC}} --output_table=apache-beam-testing.beam_run_inference.result_sentiment_distilbert_base_uncased" - name: run Pytorch Vision Classification with Resnet 101 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_classification_benchmarks \ - -Prunner=DataflowRunner \ - -PpythonVersion=3.10 \ - -PloadTest.requirementsTxtFile=apache_beam/ml/inference/torch_tests_requirements.txt \ - '-PloadTest.args=${{ env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_1 }} --job_name=benchmark-tests-pytorch-imagenet-python-101-${{env.NOW_UTC}} --output=gs://temp-storage-for-end-to-end-tests/torch/result_resnet101-${{env.NOW_UTC}}.txt' \ + -PloadTest.mainClass=apache_beam.testing.benchmarks.inference.pytorch_image_classification_benchmarks + -Prunner=DataflowRunner + -PpythonVersion=3.10 + -PloadTest.requirementsTxtFile=apache_beam/ml/inference/torch_tests_requirements.txt + -PloadTest.args="${{ env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_1 }} --job_name=benchmark-tests-pytorch-imagenet-python-101-${{env.NOW_UTC}} --output=gs://temp-storage-for-end-to-end-tests/torch/result_resnet101-${{env.NOW_UTC}}.txt" - name: run Pytorch Imagenet Classification with Resnet 152 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_classification_benchmarks \ - -Prunner=DataflowRunner \ - -PpythonVersion=3.10 \ - -PloadTest.requirementsTxtFile=apache_beam/ml/inference/torch_tests_requirements.txt \ - '-PloadTest.args=${{ env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_2 }} --job_name=benchmark-tests-pytorch-imagenet-python-152-${{env.NOW_UTC}} --output=gs://temp-storage-for-end-to-end-tests/torch/result_resnet152-${{env.NOW_UTC}}.txt' \ + -PloadTest.mainClass=apache_beam.testing.benchmarks.inference.pytorch_image_classification_benchmarks + -Prunner=DataflowRunner + -PpythonVersion=3.10 + -PloadTest.requirementsTxtFile=apache_beam/ml/inference/torch_tests_requirements.txt + -PloadTest.args="${{ env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_2 }} --job_name=benchmark-tests-pytorch-imagenet-python-152-${{env.NOW_UTC}} --output=gs://temp-storage-for-end-to-end-tests/torch/result_resnet152-${{env.NOW_UTC}}.txt" - name: run Pytorch Language Modeling using Hugging Face bert-base-uncased model 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_language_modeling_benchmarks \ - -Prunner=DataflowRunner \ - -PpythonVersion=3.10 \ - -PloadTest.requirementsTxtFile=apache_beam/ml/inference/torch_tests_requirements.txt \ - '-PloadTest.args=${{ env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_3 }} --job_name=benchmark-tests-pytorch-language-modeling-bert-base-uncased-${{env.NOW_UTC}} --output=gs://temp-storage-for-end-to-end-tests/torch/result_bert_base_uncased-${{env.NOW_UTC}}.txt' \ + -PloadTest.mainClass=apache_beam.testing.benchmarks.inference.pytorch_language_modeling_benchmarks + -Prunner=DataflowRunner + -PpythonVersion=3.10 + -PloadTest.requirementsTxtFile=apache_beam/ml/inference/torch_tests_requirements.txt + -PloadTest.args="${{ env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_3 }} --job_name=benchmark-tests-pytorch-language-modeling-bert-base-uncased-${{env.NOW_UTC}} --output=gs://temp-storage-for-end-to-end-tests/torch/result_bert_base_uncased-${{env.NOW_UTC}}.txt" - name: run Pytorch Langauge Modeling using Hugging Face bert-large-uncased model 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_language_modeling_benchmarks \ - -Prunner=DataflowRunner \ - -PpythonVersion=3.10 \ - -PloadTest.requirementsTxtFile=apache_beam/ml/inference/torch_tests_requirements.txt \ - '-PloadTest.args=${{ env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_4 }} --job_name=benchmark-tests-pytorch-language-modeling-bert-large-uncased-${{env.NOW_UTC}} --output=gs://temp-storage-for-end-to-end-tests/torch/result_bert_large_uncased-${{env.NOW_UTC}}.txt' \ + -PloadTest.mainClass=apache_beam.testing.benchmarks.inference.pytorch_language_modeling_benchmarks + -Prunner=DataflowRunner + -PpythonVersion=3.10 + -PloadTest.requirementsTxtFile=apache_beam/ml/inference/torch_tests_requirements.txt + -PloadTest.args="${{ env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_4 }} --job_name=benchmark-tests-pytorch-language-modeling-bert-large-uncased-${{env.NOW_UTC}} --output=gs://temp-storage-for-end-to-end-tests/torch/result_bert_large_uncased-${{env.NOW_UTC}}.txt" - name: run Pytorch Imagenet Classification with Resnet 152 with Tesla T4 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_classification_benchmarks \ - -Prunner=DataflowRunner \ - -PpythonVersion=3.10 \ - -PloadTest.requirementsTxtFile=apache_beam/ml/inference/torch_tests_requirements.txt \ - '-PloadTest.args=${{ env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_5 }} --job_name=benchmark-tests-pytorch-imagenet-python-gpu-${{env.NOW_UTC}} --output=gs://temp-storage-for-end-to-end-tests/torch/result_resnet152_gpu-${{env.NOW_UTC}}.txt' + -PloadTest.mainClass=apache_beam.testing.benchmarks.inference.pytorch_image_classification_benchmarks + -Prunner=DataflowRunner + -PpythonVersion=3.10 + -PloadTest.requirementsTxtFile=apache_beam/ml/inference/torch_tests_requirements.txt + -PloadTest.args="${{ env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_5 }} --job_name=benchmark-tests-pytorch-imagenet-python-gpu-${{env.NOW_UTC}} --output=gs://temp-storage-for-end-to-end-tests/torch/result_resnet152_gpu-${{env.NOW_UTC}}.txt" - name: run Table Row Inference Sklearn 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.table_row_inference_benchmark \ - -Prunner=DataflowRunner \ - -PpythonVersion=3.10 \ - -PloadTest.requirementsTxtFile=apache_beam/ml/inference/table_row_inference_requirements.txt \ - '-PloadTest.args=${{ env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_9 }} --autoscaling_algorithm=NONE --metrics_table=result_table_row_inference_batch --influx_measurement=result_table_row_inference_batch --mode=batch --input_file=gs://apache-beam-ml/testing/inputs/table_rows_100k_benchmark.jsonl --input_expand_factor=100 --output_table=apache-beam-testing:beam_run_inference.result_table_row_inference_batch_outputs --job_name=benchmark-tests-table-row-inference-batch-${{env.NOW_UTC}}' + -PloadTest.mainClass=apache_beam.testing.benchmarks.inference.table_row_inference_benchmark + -Prunner=DataflowRunner + -PpythonVersion=3.10 + -PloadTest.requirementsTxtFile=apache_beam/ml/inference/table_row_inference_requirements.txt + -PloadTest.args="${{ env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_9 }} --autoscaling_algorithm=NONE --metrics_table=result_table_row_inference_batch --influx_measurement=result_table_row_inference_batch --mode=batch --input_file=gs://apache-beam-ml/testing/inputs/table_rows_100k_benchmark.jsonl --input_expand_factor=100 --output_table=apache-beam-testing:beam_run_inference.result_table_row_inference_batch_outputs --job_name=benchmark-tests-table-row-inference-batch-${{env.NOW_UTC}}" - name: run Table Row Inference Sklearn Stream 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.table_row_inference_benchmark \ - -Prunner=DataflowRunner \ - -PpythonVersion=3.10 \ - -PloadTest.requirementsTxtFile=apache_beam/ml/inference/table_row_inference_requirements.txt \ - '-PloadTest.args=${{ env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_10 }} --autoscaling_algorithm=THROUGHPUT_BASED --max_num_workers=20 --metrics_table=result_table_row_inference_stream --influx_measurement=result_table_row_inference_stream --mode=streaming --input_subscription=projects/apache-beam-testing/subscriptions/table_row_inference_benchmark --window_size_sec=60 --trigger_interval_sec=30 --timeout_ms=900000 --output_table=apache-beam-testing:beam_run_inference.result_table_row_inference_stream_outputs --job_name=benchmark-tests-table-row-inference-stream-${{env.NOW_UTC}}' + -PloadTest.mainClass=apache_beam.testing.benchmarks.inference.table_row_inference_benchmark + -Prunner=DataflowRunner + -PpythonVersion=3.10 + -PloadTest.requirementsTxtFile=apache_beam/ml/inference/table_row_inference_requirements.txt + -PloadTest.args="${{ env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_10 }} --autoscaling_algorithm=THROUGHPUT_BASED --max_num_workers=20 --metrics_table=result_table_row_inference_stream --influx_measurement=result_table_row_inference_stream --mode=streaming --input_subscription=projects/apache-beam-testing/subscriptions/table_row_inference_benchmark --window_size_sec=60 --trigger_interval_sec=30 --timeout_ms=900000 --output_table=apache-beam-testing:beam_run_inference.result_table_row_inference_stream_outputs --job_name=benchmark-tests-table-row-inference-stream-${{env.NOW_UTC}}" - 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_11 }} --job_name=benchmark-tests-mltransform-generate-vocab-batch-${{env.NOW_UTC}}' + -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_11 }} --job_name=benchmark-tests-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 \ - -PbeamPythonExtra=ml_test \ - -PloadTest.requirementsTxtFile=apache_beam/ml/transforms/mltransform_tests_requirements.txt \ - '-PloadTest.args=${{ env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_12 }} --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_${{env.NOW_UTC}}' \ No newline at end of file + -PloadTest.mainClass=apache_beam.testing.benchmarks.inference.mltransform_one_hot_encoding_benchmark + -Prunner=DataflowRunner + -PpythonVersion=3.10 + -PbeamPythonExtra=ml_test + -PloadTest.requirementsTxtFile=apache_beam/ml/transforms/mltransform_tests_requirements.txt + -PloadTest.args="${{ env.beam_Inference_Python_Benchmarks_Dataflow_test_arguments_12 }} --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_${{env.NOW_UTC}}" \ No newline at end of file diff --git a/.github/workflows/load-tests-pipeline-options/beam_Inference_Python_Benchmarks_Dataflow_VLLM_Gemma_Batch.txt b/.github/workflows/load-tests-pipeline-options/beam_Inference_Python_Benchmarks_Dataflow_VLLM_Gemma_Batch.txt index fd2101afa3f1..0463b5fba613 100644 --- a/.github/workflows/load-tests-pipeline-options/beam_Inference_Python_Benchmarks_Dataflow_VLLM_Gemma_Batch.txt +++ b/.github/workflows/load-tests-pipeline-options/beam_Inference_Python_Benchmarks_Dataflow_VLLM_Gemma_Batch.txt @@ -35,3 +35,4 @@ --requirements_file=apache_beam/ml/inference/vllm_tests_requirements.txt --dataflow_service_options=worker_accelerator=type:nvidia-tesla-t4;count:1;install-nvidia-driver --experiments=use_runner_v2 +--timeout_ms=16200000 diff --git a/sdks/python/apache_beam/testing/load_tests/build.gradle b/sdks/python/apache_beam/testing/load_tests/build.gradle index 73699e89c704..745f1887c51c 100644 --- a/sdks/python/apache_beam/testing/load_tests/build.gradle +++ b/sdks/python/apache_beam/testing/load_tests/build.gradle @@ -55,7 +55,7 @@ task run(type: Exec, dependsOn: installGcpTest) { exec { setWorkingDir "${project.rootDir}/sdks/python" executable 'sh' - args '-c', "${project.ext.envdir}/bin/python -m pip install -r ${requirementsTxtFileArg}" + args '-c', ". ${project.ext.envdir}/bin/activate && pip install -r ${requirementsTxtFileArg}" } } }