Skip to content

Commit

Permalink
solves the isort 6 conflicting with black problem and adds the new bl…
Browse files Browse the repository at this point in the history
…ack modifications
  • Loading branch information
garciadias committed Jan 29, 2025
1 parent 8660e43 commit a18be5f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion monai/utils/jupyter_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def plot_engine_status(


def _get_loss_from_output(
output: list[torch.Tensor | dict[str, torch.Tensor]] | dict[str, torch.Tensor] | torch.Tensor
output: list[torch.Tensor | dict[str, torch.Tensor]] | dict[str, torch.Tensor] | torch.Tensor,
) -> torch.Tensor:
"""Returns a single value from the network output, which is a dict or tensor."""

Expand Down
4 changes: 2 additions & 2 deletions monai/visualize/img2tensorboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ def _image3_animated_gif(
img_str = b""
for b_data in PIL.GifImagePlugin.getheader(ims[0])[0]:
img_str += b_data
img_str += b"\x21\xFF\x0B\x4E\x45\x54\x53\x43\x41\x50" b"\x45\x32\x2E\x30\x03\x01\x00\x00\x00"
img_str += b"\x21\xff\x0b\x4e\x45\x54\x53\x43\x41\x50" b"\x45\x32\x2e\x30\x03\x01\x00\x00\x00"
for i in ims:
for b_data in PIL.GifImagePlugin.getdata(i):
img_str += b_data
img_str += b"\x3B"
img_str += b"\x3b"

summary = SummaryX if has_tensorboardx and isinstance(writer, SummaryWriterX) else Summary
summary_image_str = summary.Image(height=10, width=10, colorspace=1, encoded_image_string=img_str)
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pep8-naming
pycodestyle
pyflakes
black>=22.12
isort>=5.1
isort>=5.1,<6
ruff
pytype>=2020.6.1; platform_system != "Windows"
types-setuptools
Expand Down

0 comments on commit a18be5f

Please sign in to comment.