File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ def _extract_start_labels(clip_labels: dict) -> dict:
2525 start_images = [img for img in clip_labels ["images" ] if img ["id" ] == 0 ]
2626 if len (start_images ) != 1 :
2727 raise ValueError (
28- "Clip labels must contain exactly one image with id 0"
28+ "Clip labels must contain exactly one first-frame image with id 0"
2929 )
3030
3131 return {
@@ -363,6 +363,7 @@ def extract_start_frames_label_s3(
363363 raise FileNotFoundError (
364364 f"File not found on S3: { s3_cliplabels_uri } "
365365 ) from e
366+ # Preserve other S3 client errors, but log them for easier diagnosis.
366367 logging .error (
367368 "Failed to extract start labels from %s (S3 error: %s)" ,
368369 s3_cliplabels_uri ,
Original file line number Diff line number Diff line change @@ -180,7 +180,10 @@ def test_extract_start_labels_requires_first_frame(video_labels):
180180 "annotations" : [{"image_id" : 1 , "id" : 1 }],
181181 }
182182
183- with pytest .raises (ValueError , match = "exactly one image with id 0" ):
183+ with pytest .raises (
184+ ValueError ,
185+ match = "exactly one first-frame image with id 0" ,
186+ ):
184187 _extract_start_labels (clip_labels )
185188
186189
You can’t perform that action at this time.
0 commit comments