Skip to content

Commit

Permalink
suppress errors in vision/fair/detectron2/projects/DensePose
Browse files Browse the repository at this point in the history
Differential Revision: D39086771

fbshipit-source-id: 330bc13416cd9abe3b879a856ddc5d4a6e8cd319
  • Loading branch information
Pyre Bot Jr authored and facebook-github-bot committed Aug 28, 2022
1 parent 330dd32 commit 717ab9f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions projects/DensePose/densepose/modeling/cse/embedder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down

0 comments on commit 717ab9f

Please sign in to comment.