Commit a0f786f4 authored by Pyre Bot Jr's avatar Pyre Bot Jr Committed by Facebook GitHub Bot
Browse files

upgrade pyre version in `fbcode/vision` - batch 2

Differential Revision: D38448021

fbshipit-source-id: 966708035115b4870a74f0ca0bbf8ea88b853527
parent b28754f8
...@@ -532,6 +532,7 @@ class GenericModel(ImplicitronModelBase): # pyre-ignore: 13 ...@@ -532,6 +532,7 @@ class GenericModel(ImplicitronModelBase): # pyre-ignore: 13
return None return None
loss = sum(losses_weighted) loss = sum(losses_weighted)
assert torch.is_tensor(loss) assert torch.is_tensor(loss)
# pyre-fixme[7]: Expected `Optional[Tensor]` but got `int`.
return loss return loss
def visualize( def visualize(
......
...@@ -84,8 +84,6 @@ class VideoWriter: ...@@ -84,8 +84,6 @@ class VideoWriter:
or a 2-tuple defining the size of the output image. or a 2-tuple defining the size of the output image.
""" """
# pyre-fixme[6]: For 1st param expected `Union[PathLike[str], str]` but got
# `Optional[str]`.
outfile = os.path.join(self.cache_dir, self.regexp % self.frame_num) outfile = os.path.join(self.cache_dir, self.regexp % self.frame_num)
if isinstance(frame, matplotlib.figure.Figure): if isinstance(frame, matplotlib.figure.Figure):
...@@ -127,8 +125,6 @@ class VideoWriter: ...@@ -127,8 +125,6 @@ class VideoWriter:
video_path: The path to the generated video. video_path: The path to the generated video.
""" """
# pyre-fixme[6]: For 1st param expected `Union[PathLike[str], str]` but got
# `Optional[str]`.
regexp = os.path.join(self.cache_dir, self.regexp) regexp = os.path.join(self.cache_dir, self.regexp)
if self.output_format == "visdom": # works for ppt too if self.output_format == "visdom": # works for ppt too
......
...@@ -215,8 +215,6 @@ def load_obj( ...@@ -215,8 +215,6 @@ def load_obj(
""" """
data_dir = "./" data_dir = "./"
if isinstance(f, (str, bytes, Path)): if isinstance(f, (str, bytes, Path)):
# pyre-fixme[6]: For 1st param expected `PathLike[Variable[AnyStr <: [str,
# bytes]]]` but got `Union[Path, bytes, str]`.
data_dir = os.path.dirname(f) data_dir = os.path.dirname(f)
if path_manager is None: if path_manager is None:
path_manager = PathManager() path_manager = PathManager()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment