Skip to content

Commit

Permalink
Fix bug that subsampled_streams is modified during iteration
Browse files Browse the repository at this point in the history
This extracts the keys from subsampled_streams so it can be modified in the loop
  • Loading branch information
libeanim committed Feb 26, 2024
1 parent 28e7d1c commit 133f6f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion video2dataset/workers/download_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def data_generator():
)
subsampled_streams, metas, error_message = broadcast_subsampler(streams, meta)

for modality in subsampled_streams:
for modality in list(subsampled_streams.keys()):
for modality_subsampler in self.subsamplers[modality]:
subsampled_streams, metas, error_message = modality_subsampler(subsampled_streams, metas)

Expand Down

0 comments on commit 133f6f7

Please sign in to comment.