Skip to content

nightly test error: modules/jupyter_utils.ipynb #230

Description

@wyli

Describe the bug
from: https://github.com/Project-MONAI/MONAI/runs/2800057566?check_suite_focus=true

Running ./modules/jupyter_utils.ipynb
Checking PEP8 compliance...
Running notebook...
Before:
    "max_epochs = 20\n",
After:
    "max_epochs = 1\n",

Executing:   0%|          | 0/19 [00:00<?, ?cell/s]
Executing:   5%|▌         | 1/19 [00:00<00:17,  1.00cell/s]
Executing:  16%|█▌        | 3/19 [00:05<00:21,  1.34s/cell]
Executing:  26%|██▋       | 5/19 [00:08<00:19,  1.42s/cell]
Executing:  37%|███▋      | 7/19 [00:10<00:14,  1.23s/cell]
Executing:  47%|████▋     | 9/19 [00:12<00:12,  1.26s/cell]
Executing:  89%|████████▉ | 17/19 [00:13<00:01,  1.12cell/s]
Executing:  89%|████████▉ | 17/19 [00:16<00:01,  1.05cell/s]
Traceback (most recent call last):
  File "/opt/conda/bin/papermill", line 8, in <module>
    sys.exit(papermill())
  File "/opt/conda/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/opt/conda/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/opt/conda/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/conda/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/opt/conda/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/opt/conda/lib/python3.8/site-packages/papermill/cli.py", line 250, in papermill
    execute_notebook(
  File "/opt/conda/lib/python3.8/site-packages/papermill/execute.py", line 122, in execute_notebook
    raise_for_execution_errors(nb, output_path)
  File "/opt/conda/lib/python3.8/site-packages/papermill/execute.py", line 234, in raise_for_execution_errors
    raise error
papermill.exceptions.PapermillExecutionError: 
---------------------------------------------------------------------------
Exception encountered at "In [8]":
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-8-c8d3831b5d61> in <module>
----> 1 con.plot_status(logger)

/opt/conda/lib/python3.8/site-packages/monai/utils/jupyter_utils.py in plot_status(self, logger, plot_func)
    343         """
    344         with self.lock:
--> 345             self.fig, _ = plot_func(title=self.status(), engine=self.engine, logger=logger, fig=self.fig)
    346             return self.fig

/opt/conda/lib/python3.8/site-packages/monai/utils/jupyter_utils.py in plot_engine_status(engine, logger, title, yscale, avg_keys, window_fraction, image_fn, fig)
    203             else:
    204                 label = "Batch" if src is engine.state.batch else "Output"
--> 205                 images = image_fn(label, src)
    206 
    207                 for i, im in enumerate(images):

/opt/conda/lib/python3.8/site-packages/monai/utils/jupyter_utils.py in tensor_to_images(name, tensor)
    144     each channel separately.
    145     """
--> 146     if tensor.ndim == 4 and tensor.shape[2] > 2 and tensor.shape[3] > 2:
    147         return tuple(tensor[0].cpu().data.numpy())
    148     if tensor.ndim == 5 and tensor.shape[3] > 2 and tensor.shape[4] > 2:

AttributeError: 'NoneType' object has no attribute 'ndim'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions