Skip to content

Commit 65f750f

Browse files
committed
sort before plotting
1 parent dc75277 commit 65f750f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

benchmarks/decoders/benchmark_decoders_library.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ def decode_and_resize(self, video_file, pts_list, height, width, device):
425425
num_ffmpeg_threads=num_ffmpeg_threads,
426426
device=self._device,
427427
seek_mode=self._seek_mode,
428+
stream_index=self._stream_index,
428429
)
429430
frames = decoder.get_frames_played_at(pts_list)
430431
frames = self.transforms_v2.functional.resize(frames.data, (height, width))
@@ -828,7 +829,7 @@ def run_benchmarks(
828829
# are using different random pts values across videos.
829830
random_pts_list = (torch.rand(num_samples) * duration).tolist()
830831

831-
for decoder_name, decoder in decoder_dict.items():
832+
for decoder_name, decoder in sorted(decoder_dict.items(), key=lambda x: x[0]):
832833
print(f"video={video_file_path}, decoder={decoder_name}")
833834

834835
if dataloader_parameters:

0 commit comments

Comments
 (0)