From 4bf4a8aaff2ab34789731810eed45e6a61a73cfd Mon Sep 17 00:00:00 2001 From: generatedunixname1401739305002972 Date: Sun, 10 May 2026 11:10:07 -0700 Subject: [PATCH] Fix PYRE_MISSING_ANNOTATIONS issues in fbcode/deeplearning/projects/sam3_release/sam3/model/io_utils.py Differential Revision: D104574586 fbshipit-source-id: 9492a0033999987f381fe83ef198ebc315f92217 --- sam3/model/io_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sam3/model/io_utils.py b/sam3/model/io_utils.py index 1068ce8..77ffbd1 100644 --- a/sam3/model/io_utils.py +++ b/sam3/model/io_utils.py @@ -726,10 +726,10 @@ class AsyncVideoFileLoaderWithTorchCodec: raise RuntimeError(f"Failed to load frame {index} after {max_tries} tries") - def __len__(self): + def __len__(self) -> int: return len(self.images) - def __getstate__(self): + def __getstate__(self) -> dict[str, Any]: """ Remove a few attributes during pickling, so that this async video loader can be saved and loaded as a part of the model session.