From 717ab9f0aeca216a2f800e43d705766251ba3a55 Mon Sep 17 00:00:00 2001 From: Pyre Bot Jr <> Date: Sat, 27 Aug 2022 23:51:41 -0700 Subject: [PATCH] suppress errors in `vision/fair/detectron2/projects/DensePose` Differential Revision: D39086771 fbshipit-source-id: 330bc13416cd9abe3b879a856ddc5d4a6e8cd319 --- projects/DensePose/densepose/modeling/cse/embedder.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/DensePose/densepose/modeling/cse/embedder.py b/projects/DensePose/densepose/modeling/cse/embedder.py index e121281cf3..7f52b06032 100644 --- a/projects/DensePose/densepose/modeling/cse/embedder.py +++ b/projects/DensePose/densepose/modeling/cse/embedder.py @@ -99,6 +99,8 @@ def load_from_model_checkpoint(self, fpath: str, prefix: Optional[str] = None): state_dict = pickle.load(hFile, encoding="latin1") # pyre-ignore[6] else: with PathManager.open(fpath, "rb") as hFile: + # pyre-fixme[6]: For 1st param expected `Union[PathLike[typing.Any], + # IO[bytes], str, BinaryIO]` but got `Union[IO[bytes], IO[str]]`. state_dict = torch.load(hFile, map_location=torch.device("cpu")) if state_dict is not None and "model" in state_dict: state_dict_local = {}