Skip to content

Commit

Permalink
add name to add_figure
Browse files Browse the repository at this point in the history
  • Loading branch information
visualDust committed Dec 31, 2023
1 parent d2e00e8 commit 450da85
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions neetbox/client/apis/_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ def add_image(name: str, image, dataformats: str = None):


def add_figure(
name,
figure,
close: Optional[bool] = True,
):
Expand All @@ -183,6 +184,6 @@ def add_figure(
walltime: Override default walltime (time.time()) of event
"""
if isinstance(figure, list):
add_image(image=figure_to_image(figure, close), dataformats="NCHW")
add_image(name=name, image=figure_to_image(figure, close), dataformats="NCHW")
else:
add_image(image=figure_to_image(figure, close), dataformats="CHW")
add_image(name=name, image=figure_to_image(figure, close), dataformats="CHW")

0 comments on commit 450da85

Please sign in to comment.