Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit 289f545

Browse files
author
Sara Adkins
committed
style
1 parent 1eb3202 commit 289f545

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/deepsparse/benchmark/data_creation.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ def generate_random_image_data(
110110
f"Using default image shape {image_shape}"
111111
)
112112

113-
input_data = [numpy.random.randint(0, high=255, size=image_shape).astype(numpy.uint8) for _ in range(batch_size)]
113+
input_data = [
114+
numpy.random.randint(0, high=255, size=image_shape).astype(numpy.uint8)
115+
for _ in range(batch_size)
116+
]
114117
return input_data
115118

116119

src/deepsparse/benchmark/helpers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
DEFAULT_STRING_LENGTH = 50
3737
DEFAULT_IMAGE_SHAPE = (240, 240, 3)
3838

39+
3940
class ThreadPinningMode:
4041
CORE: str = "core"
4142
NUMA: str = "numa"

tests/test_pipeline_benchmark.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ def test_generate_random_question_data():
129129
avg_word_len = 10
130130
config_args = {"gen_sequence_length": 50}
131131
config = PipelineBenchmarkConfig(**config_args)
132-
question, context = generate_random_question_data(config, 1, avg_word_len=avg_word_len)
132+
question, context = generate_random_question_data(
133+
config, 1, avg_word_len=avg_word_len
134+
)
133135
assert len(question) == config.gen_sequence_length
134136
assert len(context) == config.gen_sequence_length
135137
num_q_spaces = question.count(" ")

0 commit comments

Comments
 (0)