Skip to content

Commit

Permalink
[PyOV][SAMPLES] Fix bugbear issue B038 (openvinotoolkit#22183)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Iwaszkiewicz authored Jan 16, 2024
1 parent 2126eea commit 0ad801a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion samples/python/benchmark/bert_benchmark/bert_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def main():
sst2_sentences = sst2['validation']['sentence']
# Warm up
encoded_warm_up = dict(tokenizer('Warm up sentence is here.', return_tensors='np'))
for _ in ireqs:
for _ in range(len(ireqs)):
ireqs.start_async(encoded_warm_up)
ireqs.wait_all()
# Benchmark
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def main():
for model_input in compiled_model.inputs:
fill_tensor_random(ireq.get_tensor(model_input))
# Warm up
for _ in ireqs:
for _ in range(len(ireqs)):
ireqs.start_async()
ireqs.wait_all()
# Benchmark for seconds_to_run seconds and at least niter iterations
Expand Down

0 comments on commit 0ad801a

Please sign in to comment.