Project-MONAI/tutorials

FileNotFoundError in profiling_camelyon_pipeline.ipynb

KumoLiu opened this issue · 1 comments

08:26:03  Running ./pathology/tumor_detection/ignite/profiling_camelyon_pipeline.ipynb
08:26:03  Checking PEP8 compliance...
08:26:03  Running notebook...
08:26:11  MONAI version: 1.3.0+87.ge9e27385
08:26:11  Numpy version: 1.22.2
08:26:11  Pytorch version: 2.1.0a0+29c30b1
08:26:11  MONAI flags: HAS_EXT = False, USE_COMPILED = False, USE_META_DICT = False
08:26:11  MONAI rev id: e9e273858b6904659b0cd581d357662dc5c782f6
08:26:11  MONAI __file__: /home/jenkins/agent/workspace/Monai-notebooks/MONAI/monai/__init__.py
08:26:11  
08:26:11  Optional dependencies:
08:26:11  Pytorch Ignite version: 0.4.11
08:26:11  ITK version: 5.3.0
08:26:11  Nibabel version: 5.2.1
08:26:11  scikit-image version: 0.22.0
08:26:11  scipy version: 1.11.1
08:26:11  Pillow version: 9.2.0
08:26:11  Tensorboard version: 2.16.2
08:26:11  gdown version: 4.7.3
08:26:11  TorchVision version: 0.16.0a0
08:26:11  tqdm version: 4.65.0
08:26:11  lmdb version: 1.4.1
08:26:11  psutil version: 5.9.4
08:26:11  pandas version: 1.5.2
08:26:11  einops version: 0.6.1
08:26:11  transformers version: 4.38.2
08:26:11  mlflow version: 2.11.1
08:26:11  pynrrd version: 1.0.0
08:26:11  clearml version: 1.14.5rc0
08:26:11  
08:26:11  For details about installing the optional dependencies, please visit:
08:26:11      https://docs.monai.io/en/latest/installation.html#installing-the-recommended-dependencies
08:26:11  
08:26:13  papermill  --progress-bar -k python3
08:26:13  /usr/local/lib/python3.10/dist-packages/papermill/iorw.py:153: UserWarning: the file is not specified with any extension : -
08:26:13    warnings.warn(
08:27:04  
Executing:   0%|          | 0/19 [00:00<?, ?cell/s]
Executing:   5%|▌         | 1/19 [00:01<00:26,  1.49s/cell]
Executing:  32%|███▏      | 6/19 [00:19<00:43,  3.35s/cell]
Executing:  42%|████▏     | 8/19 [00:26<00:37,  3.39s/cell]
Executing:  53%|█████▎    | 10/19 [00:36<00:35,  3.91s/cell]
Executing:  63%|██████▎   | 12/19 [00:47<00:30,  4.39s/cell]
Executing:  68%|██████▊   | 13/19 [00:47<00:21,  3.64s/cell]
Executing:  89%|████████▉ | 17/19 [00:48<00:03,  1.87s/cell]
Executing:  89%|████████▉ | 17/19 [00:50<00:05,  2.96s/cell]
08:27:04  /usr/local/lib/python3.10/dist-packages/papermill/iorw.py:153: UserWarning: the file is not specified with any extension : -
08:27:04    warnings.warn(
08:27:04  Traceback (most recent call last):
08:27:04    File "/usr/local/bin/papermill", line 8, in <module>
08:27:04      sys.exit(papermill())
08:27:04    File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1157, in __call__
08:27:04      return self.main(*args, **kwargs)
08:27:04    File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1078, in main
08:27:04      rv = self.invoke(ctx)
08:27:04    File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1434, in invoke
08:27:04      return ctx.invoke(self.callback, **ctx.params)
08:27:04    File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 783, in invoke
08:27:04      return __callback(*args, **kwargs)
08:27:04    File "/usr/local/lib/python3.10/dist-packages/click/decorators.py", line 33, in new_func
08:27:04      return f(get_current_context(), *args, **kwargs)
08:27:04    File "/usr/local/lib/python3.10/dist-packages/papermill/cli.py", line 254, in papermill
08:27:04      execute_notebook(
08:27:04    File "/usr/local/lib/python3.10/dist-packages/papermill/execute.py", line 134, in execute_notebook
08:27:04      raise_for_execution_errors(nb, output_path)
08:27:04    File "/usr/local/lib/python3.10/dist-packages/papermill/execute.py", line 241, in raise_for_execution_errors
08:27:04      raise error
08:27:04  papermill.exceptions.PapermillExecutionError: 
08:27:04  ---------------------------------------------------------------------------
08:27:04  Exception encountered at "In [7]":
08:27:04  ---------------------------------------------------------------------------
08:27:04  FileNotFoundError                         Traceback (most recent call last)
08:27:04  Cell In[7], line 2
08:27:04        1 # Load NVTX Push/Pop Range Summary
08:27:04  ----> 2 summary = pd.read_csv("profile_report_nvtxppsum.csv")
08:27:04        3 # display(summary)
08:27:04        4 
08:27:04        5 # Set the Range (which is the name of each range) as the index
08:27:04        6 summary.set_index("Range", inplace=True)
08:27:04  
08:27:04  File /usr/local/lib/python3.10/dist-packages/pandas/util/_decorators.py:211, in deprecate_kwarg.<locals>._deprecate_kwarg.<locals>.wrapper(*args, **kwargs)
08:27:04      209     else:
08:27:04      210         kwargs[new_arg_name] = new_arg_value
08:27:04  --> 211 return func(*args, **kwargs)
08:27:04  
08:27:04  File /usr/local/lib/python3.10/dist-packages/pandas/util/_decorators.py:331, in deprecate_nonkeyword_arguments.<locals>.decorate.<locals>.wrapper(*args, **kwargs)
08:27:04      325 if len(args) > num_allow_args:
08:27:04      326     warnings.warn(
08:27:04      327         msg.format(arguments=_format_argument_list(allow_args)),
08:27:04      328         FutureWarning,
08:27:04      329         stacklevel=find_stack_level(),
08:27:04      330     )
08:27:04  --> 331 return func(*args, **kwargs)
08:27:04  
08:27:04  File /usr/local/lib/python3.10/dist-packages/pandas/io/parsers/readers.py:950, in read_csv(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, encoding_errors, dialect, error_bad_lines, warn_bad_lines, on_bad_lines, delim_whitespace, low_memory, memory_map, float_precision, storage_options)
08:27:04      935 kwds_defaults = _refine_defaults_read(
08:27:04      936     dialect,
08:27:04      937     delimiter,
08:27:04     (...)
08:27:04      946     defaults={"delimiter": ","},
08:27:04      947 )
08:27:04      948 kwds.update(kwds_defaults)
08:27:04  --> 950 return _read(filepath_or_buffer, kwds)
08:27:04  
08:27:04  File /usr/local/lib/python3.10/dist-packages/pandas/io/parsers/readers.py:605, in _read(filepath_or_buffer, kwds)
08:27:04      602 _validate_names(kwds.get("names", None))
08:27:04      604 # Create the parser.
08:27:04  --> 605 parser = TextFileReader(filepath_or_buffer, **kwds)
08:27:04      607 if chunksize or iterator:
08:27:04      608     return parser
08:27:04  
08:27:04  File /usr/local/lib/python3.10/dist-packages/pandas/io/parsers/readers.py:1442, in TextFileReader.__init__(self, f, engine, **kwds)
08:27:04     1439     self.options["has_index_names"] = kwds["has_index_names"]
08:27:04     1441 self.handles: IOHandles | None = None
08:27:04  -> 1442 self._engine = self._make_engine(f, self.engine)
08:27:04  
08:27:04  File /usr/local/lib/python3.10/dist-packages/pandas/io/parsers/readers.py:1735, in TextFileReader._make_engine(self, f, engine)
08:27:04     1733     if "b" not in mode:
08:27:04     1734         mode += "b"
08:27:04  -> 1735 self.handles = get_handle(
08:27:04     1736     f,
08:27:04     1737     mode,
08:27:04     1738     encoding=self.options.get("encoding", None),
08:27:04     1739     compression=self.options.get("compression", None),
08:27:04     1740     memory_map=self.options.get("memory_map", False),
08:27:04     1741     is_text=is_text,
08:27:04     1742     errors=self.options.get("encoding_errors", "strict"),
08:27:04     1743     storage_options=self.options.get("storage_options", None),
08:27:04     1744 )
08:27:04     1745 assert self.handles is not None
08:27:04     1746 f = self.handles.handle
08:27:04  
08:27:04  File /usr/local/lib/python3.10/dist-packages/pandas/io/common.py:856, in get_handle(path_or_buf, mode, encoding, compression, memory_map, is_text, errors, storage_options)
08:27:04      851 elif isinstance(handle, str):
08:27:04      852     # Check whether the filename is to be opened in binary mode.
08:27:04      853     # Binary mode does not support 'encoding' and 'newline'.
08:27:04      854     if ioargs.encoding and "b" not in ioargs.mode:
08:27:04      855         # Encoding
08:27:04  --> 856         handle = open(
08:27:04      857             handle,
08:27:04      858             ioargs.mode,
08:27:04      859             encoding=ioargs.encoding,
08:27:04      860             errors=errors,
08:27:04      861             newline="",
08:27:04      862         )
08:27:04      863     else:
08:27:04      864         # Binary mode
08:27:04      865         handle = open(handle, ioargs.mode)
08:27:04  
08:27:04  FileNotFoundError: [Errno 2] No such file or directory: 'profile_report_nvtxppsum.csv'

Fixed by updated the base image.