Project-MONAI / Project-MONAI/tutorials

cron test error 3d_segmentation/unetr_btcv_segmentation_3d.ipynb

Open
#276 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Jupyter Notebook
Stars
2.5k
Forks
803
Avg merge
6d 22h
Merged PRs (30d)
3

Description

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

Running ./3d_segmentation/unetr_btcv_segmentation_3d.ipynb
Checking PEP8 compliance...
stdin:384:2: N816 variable 'split_JSON' in global scope should not be mixedCase
split_JSON = "dataset_0.json"
 ^
stdin:464:17: C408 Unnecessary list call - rewrite as a literal.
    dice_vals = list()
                ^
stdin:466:13: B007 Loop control variable 'step' not used within the loop body. If this is intended, start the name with an underscore.
        for step, batch in enumerate(epoch_iterator_val):
            ^
Error: Try running with autofixes: --autofix.

Check failed!
Running notebook...

Executing:   0%|          | 0/23 [00:00<?, ?cell/s]
Executing:   4%|▍         | 1/23 [00:00<00:18,  1.19cell/s]
Executing:  13%|█▎        | 3/23 [00:06<00:27,  1.37s/cell]
Executing:  17%|█▋        | 4/23 [00:08<00:32,  1.73s/cell]
Executing:  43%|████▎     | 10/23 [00:08<00:15,  1.23s/cell]
Executing:  43%|████▎     | 10/23 [00:10<00:13,  1.02s/cell]
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 [5]":
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-5-73b1e433c495> in <module>
      2 split_JSON = "dataset_0.json"
      3 datasets = data_dir + split_JSON
----> 4 datalist = load_decathlon_datalist(datasets, True, "training")
      5 val_files = load_decathlon_datalist(datasets, True, "validation")
      6 train_ds = CacheDataset(

/opt/conda/lib/python3.8/site-packages/monai/data/decathlon_datalist.py in load_decathlon_datalist(data_list_file_path, is_segmentation, data_list_key, base_dir)
    114     """
    115     if not os.path.isfile(data_list_file_path):
--> 116         raise ValueError(f"Data list file {data_list_file_path} does not exist.")
    117     with open(data_list_file_path) as json_file:
    118         json_data = json.load(json_file)

ValueError: Data list file /dataset/dataset_0.json does not exist.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with 3d_segmentation/unetr_btcv_segmentation_3d.ipynb, reviewing the lint findings around split_JSON, dice_vals, and the step loop, then inspect cell In [5] and its /dataset/dataset_0.json input. Run the cron notebook checks and execution to confirm the lint errors and missing data-list failure are resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python
Domain
ci-cd, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.