Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZeroDivisionError #69

Open
casperdcl opened this issue Sep 18, 2024 · 1 comment
Open

ZeroDivisionError #69

casperdcl opened this issue Sep 18, 2024 · 1 comment

Comments

@casperdcl
Copy link

casperdcl commented Sep 18, 2024

I have the same issue as #61 & #64 (and likely #62 & #63):

File "/opt/conda/lib/python3.12/site-packages/tensorboard_plugin_3d/plugin.py", line 173, in _find_next_images
  self.current_run = (int(idx) - 1) % len(self._all_runs)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ZeroDivisionError: integer modulo by zero

I'm using SyneRBI/PETRIC@16393ed; effectively:

monai.visualize.plot_2d_or_3d_image(np.clip(nchwd, 0, 1), step, tbX_sw, tag='image')

Note that the "Images" tab shows the GIF properly.

But the "3D" tab doesn't display, and forcefully loading the 3D plugin produces the ZeroDivisionError in tensorboard's logs.

@casperdcl
Copy link
Author

casperdcl commented Sep 18, 2024

I even tried applying a patch to tensorboard_plugin_3d/plugin.py:

99c99
<             if tag.startswith('image'):
---
>             if 'image' in tag:
101c101
<             elif tag.startswith('label'):
---
>             elif 'label' in tag:
195c195
<                         tag.startswith('image') or tag.startswith('label')):
---
>                         'image' in tag or 'label' in tag):

but that didn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant