From f17444abcd647a299f23fe2bf6324b8947cdee22 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 7 Jul 2022 23:46:55 +0200 Subject: [PATCH] Simplify benchmarks.py assertions (#8515) --- utils/benchmarks.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/benchmarks.py b/utils/benchmarks.py index 03bab9b6ded2..d412653c866f 100644 --- a/utils/benchmarks.py +++ b/utils/benchmarks.py @@ -61,12 +61,12 @@ def run( device = select_device(device) for i, (name, f, suffix, cpu, gpu) in export.export_formats().iterrows(): # index, (name, file, suffix, CPU, GPU) try: - assert i not in (9, 10), f'{name} inference not supported' # Edge TPU and TF.js are unsupported - assert i != 5 or platform.system() == 'Darwin', f'{name} inference only supported on macOS>=10.13' + assert i not in (9, 10), 'inference not supported' # Edge TPU and TF.js are unsupported + assert i != 5 or platform.system() == 'Darwin', 'inference only supported on macOS>=10.13' # CoreML if 'cpu' in device.type: - assert cpu, f'{name} inference not supported on CPU' + assert cpu, 'inference not supported on CPU' if 'cuda' in device.type: - assert gpu, f'{name} inference not supported on GPU' + assert gpu, 'inference not supported on GPU' # Export if f == '-':