From 661d6ed0cc9aaece5bfb4f9fcd1484fa349b1540 Mon Sep 17 00:00:00 2001 From: Florian Pinault Date: Fri, 8 Dec 2023 11:11:28 +0000 Subject: [PATCH] fix qa --- scripts/speed-test.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/speed-test.py b/scripts/speed-test.py index 9a8c9ca..62d10a8 100755 --- a/scripts/speed-test.py +++ b/scripts/speed-test.py @@ -4,8 +4,6 @@ import random import time -from tqdm import tqdm - from ecml_tools.data import open_dataset VERSION = 1 @@ -83,7 +81,10 @@ def show(start, count, bytes=""): bytes = bytes / (end - start) bytes = "(" + to_human_readable_bytes(bytes) + "/s)" print( - f"Opening {count} items took {to_human_readable(end - start)}. Items per seconds: {count / (end - start) :.2f} {bytes}" + ( + f"Opening {count} items took {to_human_readable(end - start)}." + "Items per seconds: {count / (end - start) :.2f} {bytes}" + ) ) start = time.time() @@ -107,7 +108,10 @@ def process_item(ind): print() print( - f"Each item has shape {shape} and dtype {dtype}, total {size} values, total {to_human_readable_bytes(size_bytes)}" + ( + f"Each item has shape {shape} and dtype {dtype}, total {size} values," + "total {to_human_readable_bytes(size_bytes)}" + ) ) print("Speed test version:", VERSION) show(start, args.count, bytes=size_bytes * args.count)