Skip to content

Commit

Permalink
amend
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Jul 3, 2024
1 parent 761f28d commit 48d8855
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions torchrl/record/loggers/csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,8 @@ def add_video(self, tag, vid_tensor, global_step: Optional[int] = None, **kwargs
vid_tensor = vid_tensor.flatten(0, vid_tensor.ndim - 4)
vid_tensor = vid_tensor.permute((0, 2, 3, 1))
vid_tensor = vid_tensor.expand(*vid_tensor.shape[:-1], 3)
torchvision.io.write_video(
filepath, vid_tensor, fps=self.video_fps, **kwargs
)
kwargs.setdefault("fps", self.video_fps)
torchvision.io.write_video(filepath, vid_tensor, **kwargs)
else:
raise ValueError(
f"Unknown video format {self.video_format}. Must be one of 'pt', 'memmap' or 'mp4'."
Expand Down

0 comments on commit 48d8855

Please sign in to comment.