Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

For cross validation on segmentation models, the seriesID column is mandatory, even though it is optional elsewhere #344

@ant0nsc

Description

@ant0nsc

KH writes:

I initially didn’t include in dataset.csv the field “seriesID". This is mentioned in the documentation as being supported, but it turns out that omitting it generates an error:

  File "/mnt/batch/tasks/shared/LS_root/jobs//azureml/hd_f712bdf8-e076-476c-ba43-6d6878d06b1b_0/mounts/workspaceblobstore/azureml/HD_f712bdf8-e076-476c-ba43-6d6878d06b1b_0/InnerEye-DeepLearning/InnerEye/ML/visualizers/plot_cross_validation.py", line 571, in convert_rows_for_comparisons
    df = pd.merge(df, dataset_df[[CSV_SUBJECT_HEADER, CSV_SERIES_HEADER, CSV_INSTITUTION_HEADER]],
  File "/azureml-envs/azureml_17ce94ec6dd9e96403ec09a24b2cfad4/lib/python3.7/site-packages/pandas/core/frame.py", line 2905, in __getitem__
    indexer = self.loc._get_listlike_indexer(key, axis=1, raise_missing=True)[1]
  File "/azureml-envs/azureml_17ce94ec6dd9e96403ec09a24b2cfad4/lib/python3.7/site-packages/pandas/core/indexing.py", line 1254, in _get_listlike_indexer
    self._validate_read_indexer(keyarr, indexer, axis, raise_missing=raise_missing)
  File "/azureml-envs/azureml_17ce94ec6dd9e96403ec09a24b2cfad4/lib/python3.7/site-packages/pandas/core/indexing.py", line 1304, in _validate_read_indexer
    raise KeyError(f"{not_found} not in index")
KeyError: "['seriesId'] not in index”

=> I overcame the problem by adding “seriesId” as the heading for a column with no data entries, but it would be nice if the code could handle automatically the case where the field is missing (as it already does for “institutionId”).

AB#3905

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions