Skip to content

Commit

Permalink
Update Python Inference Benchmark Test to Python 3.10 (apache#32550)
Browse files Browse the repository at this point in the history
* Update Python Benchmark Test to Python 3.10

* Update base Python version in setup

* wrap in quotes
  • Loading branch information
jrmccluskey authored Sep 25, 2024
1 parent d93f93a commit faf884a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/beam_Inference_Python_Benchmarks_Dataflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Setup Python environment
uses: ./.github/actions/setup-environment-action
with:
python-version: default
python-version: '3.10'
- name: Prepare test arguments
uses: ./.github/actions/test-arguments-action
with:
Expand All @@ -95,7 +95,7 @@ jobs:
arguments: |
-PloadTest.mainClass=apache_beam.testing.benchmarks.inference.pytorch_image_classification_benchmarks \
-Prunner=DataflowRunner \
-PpythonVersion=3.9 \
-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
Expand All @@ -106,7 +106,7 @@ jobs:
arguments: |
-PloadTest.mainClass=apache_beam.testing.benchmarks.inference.pytorch_image_classification_benchmarks \
-Prunner=DataflowRunner \
-PpythonVersion=3.9 \
-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
Expand All @@ -117,7 +117,7 @@ jobs:
arguments: |
-PloadTest.mainClass=apache_beam.testing.benchmarks.inference.pytorch_language_modeling_benchmarks \
-Prunner=DataflowRunner \
-PpythonVersion=3.9 \
-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
Expand All @@ -128,7 +128,7 @@ jobs:
arguments: |
-PloadTest.mainClass=apache_beam.testing.benchmarks.inference.pytorch_language_modeling_benchmarks \
-Prunner=DataflowRunner \
-PpythonVersion=3.9 \
-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
Expand All @@ -139,6 +139,6 @@ jobs:
arguments: |
-PloadTest.mainClass=apache_beam.testing.benchmarks.inference.pytorch_image_classification_benchmarks \
-Prunner=DataflowRunner \
-PpythonVersion=3.9 \
-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'
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG BUILD_IMAGE=nvcr.io/nvidia/tensorrt:22.05-py3
ARG BUILD_IMAGE=nvcr.io/nvidia/tensorrt:23.05-py3

FROM ${BUILD_IMAGE}

ENV PATH="/usr/src/tensorrt/bin:${PATH}"

WORKDIR /workspace

COPY --from=apache/beam_python3.9_sdk:latest /opt/apache/beam /opt/apache/beam
COPY --from=apache/beam_python3.10_sdk:latest /opt/apache/beam /opt/apache/beam

RUN pip install --upgrade pip \
&& pip install torch>=1.7.1 \
Expand All @@ -32,4 +32,4 @@ RUN pip install --upgrade pip \
&& pip install cuda-python

ENTRYPOINT [ "/opt/apache/beam/boot" ]
RUN apt-get update && apt-get install -y python3.9-venv
RUN apt-get update && apt-get install -y python3.10-venv

0 comments on commit faf884a

Please sign in to comment.