Fix python_unnecessary_generator_set_comprehension issues in deeplearning/.../data/sam3_video_dataset.py

Differential Revision: D103822905

fbshipit-source-id: 42d78b7b8b527c1de0f6b3375b568b70720a53f6
This commit is contained in:
generatedunixname2094418054467506
2026-05-08 14:16:32 -07:00
committed by meta-codesync[bot]
parent ea46ebca5e
commit 66b7482602
+1 -1
View File
@@ -162,7 +162,7 @@ class VideoGroundingDataset(Sam3ImageDataset):
def _sample_stage_ids(self, queries, num_stages_sample, stage_stride):
"""Sample a subset of stage ids from all queries."""
# Later we can perhaps turn it into a Sampler class to be more flexible.
all_stage_ids = sorted(set(q["query_processing_order"] for q in queries))
all_stage_ids = sorted({q["query_processing_order"] for q in queries})
num_stages_total = len(all_stage_ids)
if num_stages_total < num_stages_sample:
raise ValueError("Not enough stages to sample")