mlcommons / training

Reference implementations of MLPerf™ training benchmarks
https://mlcommons.org/en/groups/training
Apache License 2.0
1.62k stars 557 forks source link

SSD: exception during conversion of dataset to COCO format #654

Closed ukurkure closed 8 months ago

ukurkure commented 1 year ago

Dataset 'open-images' created Converting dataset to coco format ... 0% 0/1170301 [12.4ms elapsed, ? remaining, ? samples/s] Traceback (most recent call last): File "/home/ml/.local/lib/python3.8/site-packages/fiftyone/core/document.py", line 160, in get_field value = self._doc.get_field(field_name) File "/home/ml/.local/lib/python3.8/site-packages/fiftyone/core/odm/mixins.py", line 122, in get_field raise AttributeError( AttributeError: Sample has no field 'detections'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/ml/.local/lib/python3.8/site-packages/fiftyone/core/document.py", line 68, in getitem return self.get_field(field_name) File "/home/ml/.local/lib/python3.8/site-packages/fiftyone/core/sample.py", line 99, in get_field return super().get_field(field_name) File "/home/ml/.local/lib/python3.8/site-packages/fiftyone/core/document.py", line 739, in get_field value = super().get_field(field_name) File "/home/ml/.local/lib/python3.8/site-packages/fiftyone/core/document.py", line 162, in get_field raise AttributeError( AttributeError: SampleView has no field 'detections'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "fiftyone_openimages.py", line 50, in split_view.export( File "/home/ml/.local/lib/python3.8/site-packages/fiftyone/core/collections.py", line 8076, in export _export( File "/home/ml/.local/lib/python3.8/site-packages/fiftyone/core/collections.py", line 10580, in _export foud.export_samples( File "/home/ml/.local/lib/python3.8/site-packages/fiftyone/utils/data/exporters.py", line 356, in export_samples write_dataset( File "/home/ml/.local/lib/python3.8/site-packages/fiftyone/utils/data/exporters.py", line 416, in write_dataset _write_image_dataset( File "/home/ml/.local/lib/python3.8/site-packages/fiftyone/utils/data/exporters.py", line 893, in _write_image_dataset label = sample_parser.get_label() File "/home/ml/.local/lib/python3.8/site-packages/fiftyone/utils/data/parsers.py", line 1666, in get_label label = sample[label_field] File "/home/ml/.local/lib/python3.8/site-packages/fiftyone/core/sample.py", line 60, in getitem return super().getitem(field_name) File "/home/ml/.local/lib/python3.8/site-packages/fiftyone/core/document.py", line 70, in getitem raise KeyError(e.args[0]) KeyError: "SampleView has no field 'detections'"

nv-rborkar commented 1 year ago

Thanks @ukurkure . Taking a look.

ahmadki commented 1 year ago

This is happening because the fiftyone package wasn't pinned in the requirements file, and it seems that the API has changed since the reference was written.

https://github.com/mlcommons/training/pull/675 should fix the issue

ahmadki commented 1 year ago

@nv-rborkar we can close the bug after the fix above.

nv-rborkar commented 1 year ago

@ukurkure please close the issue if Ahmad's fix above resolved your issue.