From 06fc73b7d4d80bd97e140776590d98b868c7bc3a Mon Sep 17 00:00:00 2001 From: Adrian Lizarraga Date: Thu, 23 Jan 2025 08:54:55 -0800 Subject: [PATCH] [TRT EP Perf Tool] Add annotations import to python script to support annotations on Python 3.8 (#23466) ### Description Adds `from __future__ import annotations` to python script to support annotations on Python 3.8. ### Motivation and Context Pipeline that runs this script is using Ubuntu 20.04's default python version (3.8), which does not support annotations unless one imports from __future__. --- onnxruntime/python/tools/tensorrt/perf/build/build_image.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/onnxruntime/python/tools/tensorrt/perf/build/build_image.py b/onnxruntime/python/tools/tensorrt/perf/build/build_image.py index 0384300b99..7f418af06a 100644 --- a/onnxruntime/python/tools/tensorrt/perf/build/build_image.py +++ b/onnxruntime/python/tools/tensorrt/perf/build/build_image.py @@ -6,6 +6,8 @@ Builds an Ubuntu-based Docker image with TensorRT. """ +from __future__ import annotations + import argparse import os import pty