-
Notifications
You must be signed in to change notification settings - Fork 749
Closed
Description
Describe the bug
[2023-01-27T01:28:52.008Z] Running ./deepgrow/ignite/inference_3d.ipynb
[2023-01-27T01:28:52.008Z] Checking PEP8 compliance...
[2023-01-27T01:28:52.569Z] Running notebook...
[2023-01-27T01:28:52.824Z] Before:
[2023-01-27T01:28:52.824Z] "max_epochs = 1\n",
[2023-01-27T01:28:52.824Z] After:
[2023-01-27T01:28:52.824Z] "max_epochs = 1\n",
[2023-01-27T01:28:58.060Z] MONAI version: 1.1.0+42.g8a5a5509
[2023-01-27T01:28:58.060Z] Numpy version: 1.22.2
[2023-01-27T01:28:58.060Z] Pytorch version: 1.14.0a0+410ce96
[2023-01-27T01:28:58.060Z] MONAI flags: HAS_EXT = False, USE_COMPILED = False, USE_META_DICT = False
[2023-01-27T01:28:58.060Z] MONAI rev id: 8a5a55093aebdf631b2fec14b2111a3c980ef584
[2023-01-27T01:28:58.060Z] MONAI __file__: /home/jenkins/agent/workspace/Monai-notebooks/MONAI/monai/__init__.py
[2023-01-27T01:28:58.060Z]
[2023-01-27T01:28:58.060Z] Optional dependencies:
[2023-01-27T01:28:58.060Z] Pytorch Ignite version: 0.4.10
[2023-01-27T01:28:58.060Z] ITK version: 5.3.0
[2023-01-27T01:28:58.060Z] Nibabel version: 5.0.0
[2023-01-27T01:28:58.060Z] scikit-image version: 0.19.3
[2023-01-27T01:28:58.060Z] Pillow version: 9.2.0
[2023-01-27T01:28:58.060Z] Tensorboard version: 2.9.0
[2023-01-27T01:28:58.060Z] gdown version: 4.6.0
[2023-01-27T01:28:58.060Z] TorchVision version: 0.15.0a0
[2023-01-27T01:28:58.060Z] tqdm version: 4.64.1
[2023-01-27T01:28:58.060Z] lmdb version: 1.4.0
[2023-01-27T01:28:58.060Z] psutil version: 5.9.4
[2023-01-27T01:28:58.060Z] pandas version: 1.5.2
[2023-01-27T01:28:58.060Z] einops version: 0.6.0
[2023-01-27T01:28:58.060Z] transformers version: 4.21.3
[2023-01-27T01:28:58.060Z] mlflow version: 2.1.1
[2023-01-27T01:28:58.060Z] pynrrd version: 1.0.0
[2023-01-27T01:28:58.060Z]
[2023-01-27T01:28:58.060Z] For details about installing the optional dependencies, please visit:
[2023-01-27T01:28:58.060Z] https://docs.monai.io/en/latest/installation.html#installing-the-recommended-dependencies
[2023-01-27T01:28:58.060Z]
[2023-01-27T01:28:59.946Z] papermill --progress-bar -k python3
[2023-01-27T01:29:00.506Z] /usr/local/lib/python3.8/dist-packages/papermill/iorw.py:153: UserWarning: the file is not specified with any extension : -
[2023-01-27T01:29:00.506Z] warnings.warn(
[2023-01-27T01:29:21.531Z]
Executing: 0%| | 0/11 [00:00<?, ?cell/s]
Executing: 9%|▉ | 1/11 [00:01<00:15, 1.56s/cell]
Executing: 27%|██▋ | 3/11 [00:07<00:22, 2.76s/cell]
Executing: 45%|████▌ | 5/11 [00:12<00:15, 2.64s/cell]
Executing: 64%|██████▎ | 7/11 [00:19<00:11, 2.90s/cell]
Executing: 73%|███████▎ | 8/11 [00:19<00:06, 2.27s/cell]
Executing: 73%|███████▎ | 8/11 [00:20<00:07, 2.61s/cell]
[2023-01-27T01:29:21.531Z] /usr/local/lib/python3.8/dist-packages/papermill/iorw.py:153: UserWarning: the file is not specified with any extension : -
[2023-01-27T01:29:21.531Z] warnings.warn(
[2023-01-27T01:29:21.531Z] Traceback (most recent call last):
[2023-01-27T01:29:21.531Z] File "/usr/local/bin/papermill", line 8, in <module>
[2023-01-27T01:29:21.531Z] sys.exit(papermill())
[2023-01-27T01:29:21.531Z] File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1130, in __call__
[2023-01-27T01:29:21.531Z] return self.main(*args, **kwargs)
[2023-01-27T01:29:21.531Z] File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1055, in main
[2023-01-27T01:29:21.531Z] rv = self.invoke(ctx)
[2023-01-27T01:29:21.531Z] File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1404, in invoke
[2023-01-27T01:29:21.531Z] return ctx.invoke(self.callback, **ctx.params)
[2023-01-27T01:29:21.531Z] File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 760, in invoke
[2023-01-27T01:29:21.531Z] return __callback(*args, **kwargs)
[2023-01-27T01:29:21.531Z] File "/usr/local/lib/python3.8/dist-packages/click/decorators.py", line 26, in new_func
[2023-01-27T01:29:21.531Z] return f(get_current_context(), *args, **kwargs)
[2023-01-27T01:29:21.531Z] File "/usr/local/lib/python3.8/dist-packages/papermill/cli.py", line 250, in papermill
[2023-01-27T01:29:21.531Z] execute_notebook(
[2023-01-27T01:29:21.531Z] File "/usr/local/lib/python3.8/dist-packages/papermill/execute.py", line 128, in execute_notebook
[2023-01-27T01:29:21.531Z] raise_for_execution_errors(nb, output_path)
[2023-01-27T01:29:21.531Z] File "/usr/local/lib/python3.8/dist-packages/papermill/execute.py", line 232, in raise_for_execution_errors
[2023-01-27T01:29:21.531Z] raise error
[2023-01-27T01:29:21.531Z] papermill.exceptions.PapermillExecutionError:
[2023-01-27T01:29:21.531Z] ---------------------------------------------------------------------------
[2023-01-27T01:29:21.531Z] Exception encountered at "In [5]":
[2023-01-27T01:29:21.531Z] ---------------------------------------------------------------------------
[2023-01-27T01:29:21.531Z] TypeError Traceback (most recent call last)
[2023-01-27T01:29:21.531Z] Cell In[5], line 18
[2023-01-27T01:29:21.531Z] 7 data = {
[2023-01-27T01:29:21.531Z] 8 'image': '_image.nii.gz',
[2023-01-27T01:29:21.531Z] 9 'foreground': [[66, 180, 105], [66, 180, 145]],
[2023-01-27T01:29:21.531Z] 10 'background': [],
[2023-01-27T01:29:21.531Z] 11 }
[2023-01-27T01:29:21.531Z] 12 slice_idx = original_slice_idx = data['foreground'][0][2]
[2023-01-27T01:29:21.531Z] 14 pre_transforms = [
[2023-01-27T01:29:21.531Z] 15 LoadImaged(keys='image'),
[2023-01-27T01:29:21.531Z] 16 AsChannelFirstd(keys='image'),
[2023-01-27T01:29:21.531Z] 17 Spacingd(keys='image', pixdim=pixdim, mode='bilinear'),
[2023-01-27T01:29:21.531Z] ---> 18 AddGuidanceFromPointsd(ref_image='image', guidance='guidance', foreground='foreground', background='background',
[2023-01-27T01:29:21.531Z] 19 dimensions=dimensions),
[2023-01-27T01:29:21.531Z] 20 AddChanneld(keys='image'),
[2023-01-27T01:29:21.531Z] 21 SpatialCropGuidanced(keys='image', guidance='guidance', spatial_size=roi_size),
[2023-01-27T01:29:21.531Z] 22 Resized(keys='image', spatial_size=model_size, mode='area'),
[2023-01-27T01:29:21.531Z] 23 ResizeGuidanced(guidance='guidance', ref_image='image'),
[2023-01-27T01:29:21.531Z] 24 NormalizeIntensityd(keys='image', subtrahend=208.0, divisor=388.0),
[2023-01-27T01:29:21.531Z] 25 AddGuidanceSignald(image='image', guidance='guidance'),
[2023-01-27T01:29:21.531Z] 26 EnsureTyped(keys='image')
[2023-01-27T01:29:21.531Z] 27 ]
[2023-01-27T01:29:21.531Z] 29 original_image = None
[2023-01-27T01:29:21.531Z] 30 for t in pre_transforms:
[2023-01-27T01:29:21.531Z]
[2023-01-27T01:29:21.531Z] TypeError: __init__() got an unexpected keyword argument 'dimensions'
the same issue appears in deepgrow/ignite/inference.ipynb
this is because we recently removed the deprecated dimensions
argument
https://github.com/Project-MONAI/MONAI/blob/8a5a55093aebdf631b2fec14b2111a3c980ef584/monai/apps/deepgrow/transforms.py#L494-L495
the solution is to use spatial_dims
instead.
SachidanandAlle
Metadata
Metadata
Assignees
Labels
No labels