KitwareMedical / KitwareMedical/tensorboard-plugin-3d
ZeroDivisionError
- Dominant language
- HTML
- Stars
- 36
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
I have the same issue as #61 & #64 (and likely #62 & #63):
```py
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](https://github.com/SyneRBI/PETRIC/commit/16393ed); effectively:
```py
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](https://petric.tomography.stfc.ac.uk/leaderboard/#images®exInput=ISTA%2FmMR_NEMA).
But the "3D" tab doesn't display, and [forcefully loading the 3D plugin](https://petric.tomography.stfc.ac.uk/leaderboard/#tensorboard_plugin_3d) produces the `ZeroDivisionError` in `tensorboard`'s logs.
Contributor guide
Research direction
Start in tensorboard_plugin_3d/plugin.py at _find_next_images, using the reported traceback and the provided MONAI plot_2d_or_3d_image call to reproduce the failure. Investigate the empty _all_runs case and verify that the 3D tab no longer raises ZeroDivisionError for this input.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100