Fix PYRE_MISSING_ANNOTATIONS issues in fbcode/deeplearning/projects/sam3_release/sam3/model/io_utils.py
Differential Revision: D104514357 fbshipit-source-id: 76846c2df7a5ade6e0002bb66fd2b7f574b152c5
This commit is contained in:
committed by
meta-codesync[bot]
parent
66b7482602
commit
8d01d6ce78
@@ -432,7 +432,7 @@ class AsyncImageFrameLoader:
|
|||||||
self.images[index] = img
|
self.images[index] = img
|
||||||
return img
|
return img
|
||||||
|
|
||||||
def __len__(self):
|
def __len__(self) -> int:
|
||||||
return len(self.images)
|
return len(self.images)
|
||||||
|
|
||||||
|
|
||||||
@@ -704,7 +704,7 @@ class AsyncVideoFileLoaderWithTorchCodec:
|
|||||||
frame_resized = frame_resized.to(device=self.out_device, non_blocking=True)
|
frame_resized = frame_resized.to(device=self.out_device, non_blocking=True)
|
||||||
return frame_resized
|
return frame_resized
|
||||||
|
|
||||||
def __getitem__(self, index):
|
def __getitem__(self, index: int) -> torch.Tensor:
|
||||||
if self.exception is not None:
|
if self.exception is not None:
|
||||||
raise RuntimeError("Failure in frame loading thread") from self.exception
|
raise RuntimeError("Failure in frame loading thread") from self.exception
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user