voxel51 / fiftyone

Refine high-quality datasets and visual AI models
https://fiftyone.ai
Apache License 2.0
8.89k stars 563 forks source link

[BUG] Sidebar statistics fail to load in App #1835

Closed brimoor closed 2 years ago

brimoor commented 2 years ago

On fiftyone>0.16.0, I get the error below when trying to load an oldish dataset (created prior to the introduction of the created_at field) in the App.

The error occurs as the sidebar stats load:

Screen Shot 2022-06-07 at 11 58 43 AM
TypeError: Cannot read properties of undefined (reading 'Count')
at http://localhost:5151/assets/index.1baa3d4c.js:191:12071
at a (http://localhost:5151/assets/vendor.2936b611.js:52:494206)
at _ (http://localhost:5151/assets/vendor.2936b611.js:52:483152)
at b (http://localhost:5151/assets/vendor.2936b611.js:52:484363)
at http://localhost:5151/assets/vendor.2936b611.js:52:485657
at http://localhost:5151/assets/vendor.2936b611.js:52:485629
at Object.Q [as get] (http://localhost:5151/assets/vendor.2936b611.js:52:485651)
at getNodeLoadable (http://localhost:5151/assets/vendor.2936b611.js:52:442147)
at http://localhost:5151/assets/vendor.2936b611.js:52:483869
at l2.getLeafNode (http://localhost:5151/assets/vendor.2936b611.js:52:474894)
benjaminpkane commented 2 years ago

The issue doesn't seem to be related to created_at. Can you share the dataset document (raw mongodb json/bson)?

brimoor commented 2 years ago

Yeah, here that dataset's doc:

<DatasetDocument: {
    'id': '6047e7693102ade74b2e3640',
    'name': 'bdd100k-validation-location',
    'version': '0.16.2',
    'created_at': None,
    'last_loaded_at': datetime.datetime(2022, 6, 8, 1, 24, 31, 679490),
    'sample_collection_name': 'samples.2021.03.09.16.23.53',
    'frame_collection_name': 'frames.samples.2021.03.09.16.23.53',
    'persistent': True,
    'media_type': 'image',
    'info': BaseDict({}),
    'classes': BaseDict({}),
    'default_classes': BaseList([]),
    'mask_targets': BaseDict({}),
    'default_mask_targets': BaseDict({}),
    'skeletons': BaseDict({}),
    'default_skeleton': None,
    'sample_fields': EmbeddedDocumentList([
        <SampleFieldDocument: {
            'name': 'id',
            'ftype': 'fiftyone.core.fields.ObjectIdField',
            'subfield': None,
            'embedded_doc_type': None,
            'db_field': '_id',
            'fields': BaseList([]),
        }>,
        <SampleFieldDocument: {
            'name': 'filepath',
            'ftype': 'fiftyone.core.fields.StringField',
            'subfield': None,
            'embedded_doc_type': None,
            'db_field': 'filepath',
            'fields': BaseList([]),
        }>,
        <SampleFieldDocument: {
            'name': 'tags',
            'ftype': 'fiftyone.core.fields.ListField',
            'subfield': 'fiftyone.core.fields.StringField',
            'embedded_doc_type': None,
            'db_field': 'tags',
            'fields': BaseList([]),
        }>,
        <SampleFieldDocument: {
            'name': 'metadata',
            'ftype': 'fiftyone.core.fields.EmbeddedDocumentField',
            'subfield': None,
            'embedded_doc_type': 'fiftyone.core.metadata.ImageMetadata',
            'db_field': 'metadata',
            'fields': BaseList([
                <SampleFieldDocument: {
                    'name': 'size_bytes',
                    'ftype': 'fiftyone.core.fields.IntField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'size_bytes',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'mime_type',
                    'ftype': 'fiftyone.core.fields.StringField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'mime_type',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'width',
                    'ftype': 'fiftyone.core.fields.IntField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'width',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'height',
                    'ftype': 'fiftyone.core.fields.IntField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'height',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'num_channels',
                    'ftype': 'fiftyone.core.fields.IntField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'num_channels',
                    'fields': BaseList([]),
                }>,
            ]),
        }>,
        <SampleFieldDocument: {
            'name': '_media_type',
            'ftype': 'fiftyone.core.fields.StringField',
            'subfield': None,
            'embedded_doc_type': None,
            'db_field': '_media_type',
            'fields': BaseList([]),
        }>,
        <SampleFieldDocument: {
            'name': '_rand',
            'ftype': 'fiftyone.core.fields.FloatField',
            'subfield': None,
            'embedded_doc_type': None,
            'db_field': '_rand',
            'fields': BaseList([]),
        }>,
        <SampleFieldDocument: {
            'name': 'ground_truth_weather',
            'ftype': 'fiftyone.core.fields.EmbeddedDocumentField',
            'subfield': None,
            'embedded_doc_type': 'fiftyone.core.labels.Classification',
            'db_field': 'ground_truth_weather',
            'fields': BaseList([
                <SampleFieldDocument: {
                    'name': 'id',
                    'ftype': 'fiftyone.core.fields.ObjectIdField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': '_id',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'tags',
                    'ftype': 'fiftyone.core.fields.ListField',
                    'subfield': 'fiftyone.core.fields.StringField',
                    'embedded_doc_type': None,
                    'db_field': 'tags',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'label',
                    'ftype': 'fiftyone.core.fields.StringField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'label',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'confidence',
                    'ftype': 'fiftyone.core.fields.FloatField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'confidence',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'logits',
                    'ftype': 'fiftyone.core.fields.VectorField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'logits',
                    'fields': BaseList([]),
                }>,
            ]),
        }>,
        <SampleFieldDocument: {
            'name': 'ground_truth_scene',
            'ftype': 'fiftyone.core.fields.EmbeddedDocumentField',
            'subfield': None,
            'embedded_doc_type': 'fiftyone.core.labels.Classification',
            'db_field': 'ground_truth_scene',
            'fields': BaseList([
                <SampleFieldDocument: {
                    'name': 'id',
                    'ftype': 'fiftyone.core.fields.ObjectIdField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': '_id',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'tags',
                    'ftype': 'fiftyone.core.fields.ListField',
                    'subfield': 'fiftyone.core.fields.StringField',
                    'embedded_doc_type': None,
                    'db_field': 'tags',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'label',
                    'ftype': 'fiftyone.core.fields.StringField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'label',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'confidence',
                    'ftype': 'fiftyone.core.fields.FloatField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'confidence',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'logits',
                    'ftype': 'fiftyone.core.fields.VectorField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'logits',
                    'fields': BaseList([]),
                }>,
            ]),
        }>,
        <SampleFieldDocument: {
            'name': 'ground_truth_timeofday',
            'ftype': 'fiftyone.core.fields.EmbeddedDocumentField',
            'subfield': None,
            'embedded_doc_type': 'fiftyone.core.labels.Classification',
            'db_field': 'ground_truth_timeofday',
            'fields': BaseList([
                <SampleFieldDocument: {
                    'name': 'id',
                    'ftype': 'fiftyone.core.fields.ObjectIdField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': '_id',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'tags',
                    'ftype': 'fiftyone.core.fields.ListField',
                    'subfield': 'fiftyone.core.fields.StringField',
                    'embedded_doc_type': None,
                    'db_field': 'tags',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'label',
                    'ftype': 'fiftyone.core.fields.StringField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'label',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'confidence',
                    'ftype': 'fiftyone.core.fields.FloatField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'confidence',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'logits',
                    'ftype': 'fiftyone.core.fields.VectorField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'logits',
                    'fields': BaseList([]),
                }>,
            ]),
        }>,
        <SampleFieldDocument: {
            'name': 'ground_truth_detections',
            'ftype': 'fiftyone.core.fields.EmbeddedDocumentField',
            'subfield': None,
            'embedded_doc_type': 'fiftyone.core.labels.Detections',
            'db_field': 'ground_truth_detections',
            'fields': BaseList([
                <SampleFieldDocument: {
                    'name': 'detections',
                    'ftype': 'fiftyone.core.fields.ListField',
                    'subfield': 'fiftyone.core.fields.EmbeddedDocumentField',
                    'embedded_doc_type': 'fiftyone.core.labels.Detection',
                    'db_field': 'detections',
                    'fields': BaseList([
                        <SampleFieldDocument: {
                            'name': 'attributes',
                            'ftype': 'fiftyone.core.fields.DictField',
                            'subfield': 'fiftyone.core.fields.EmbeddedDocumentField',
                            'embedded_doc_type': 'fiftyone.core.labels.Attribute',
                            'db_field': 'attributes',
                            'fields': BaseList([]),
                        }>,
                        <SampleFieldDocument: {
                            'name': 'id',
                            'ftype': 'fiftyone.core.fields.ObjectIdField',
                            'subfield': None,
                            'embedded_doc_type': None,
                            'db_field': '_id',
                            'fields': BaseList([]),
                        }>,
                        <SampleFieldDocument: {
                            'name': 'tags',
                            'ftype': 'fiftyone.core.fields.ListField',
                            'subfield': 'fiftyone.core.fields.StringField',
                            'embedded_doc_type': None,
                            'db_field': 'tags',
                            'fields': BaseList([]),
                        }>,
                        <SampleFieldDocument: {
                            'name': 'label',
                            'ftype': 'fiftyone.core.fields.StringField',
                            'subfield': None,
                            'embedded_doc_type': None,
                            'db_field': 'label',
                            'fields': BaseList([]),
                        }>,
                        <SampleFieldDocument: {
                            'name': 'bounding_box',
                            'ftype': 'fiftyone.core.fields.ListField',
                            'subfield': 'fiftyone.core.fields.FloatField',
                            'embedded_doc_type': None,
                            'db_field': 'bounding_box',
                            'fields': BaseList([]),
                        }>,
                        <SampleFieldDocument: {
                            'name': 'mask',
                            'ftype': 'fiftyone.core.fields.ArrayField',
                            'subfield': None,
                            'embedded_doc_type': None,
                            'db_field': 'mask',
                            'fields': BaseList([]),
                        }>,
                        <SampleFieldDocument: {
                            'name': 'confidence',
                            'ftype': 'fiftyone.core.fields.FloatField',
                            'subfield': None,
                            'embedded_doc_type': None,
                            'db_field': 'confidence',
                            'fields': BaseList([]),
                        }>,
                        <SampleFieldDocument: {
                            'name': 'index',
                            'ftype': 'fiftyone.core.fields.IntField',
                            'subfield': None,
                            'embedded_doc_type': None,
                            'db_field': 'index',
                            'fields': BaseList([]),
                        }>,
                    ]),
                }>,
            ]),
        }>,
        <SampleFieldDocument: {
            'name': 'ground_truth_polylines',
            'ftype': 'fiftyone.core.fields.EmbeddedDocumentField',
            'subfield': None,
            'embedded_doc_type': 'fiftyone.core.labels.Polylines',
            'db_field': 'ground_truth_polylines',
            'fields': BaseList([
                <SampleFieldDocument: {
                    'name': 'polylines',
                    'ftype': 'fiftyone.core.fields.ListField',
                    'subfield': 'fiftyone.core.fields.EmbeddedDocumentField',
                    'embedded_doc_type': 'fiftyone.core.labels.Polyline',
                    'db_field': 'polylines',
                    'fields': BaseList([
                        <SampleFieldDocument: {
                            'name': 'attributes',
                            'ftype': 'fiftyone.core.fields.DictField',
                            'subfield': 'fiftyone.core.fields.EmbeddedDocumentField',
                            'embedded_doc_type': 'fiftyone.core.labels.Attribute',
                            'db_field': 'attributes',
                            'fields': BaseList([]),
                        }>,
                        <SampleFieldDocument: {
                            'name': 'id',
                            'ftype': 'fiftyone.core.fields.ObjectIdField',
                            'subfield': None,
                            'embedded_doc_type': None,
                            'db_field': '_id',
                            'fields': BaseList([]),
                        }>,
                        <SampleFieldDocument: {
                            'name': 'tags',
                            'ftype': 'fiftyone.core.fields.ListField',
                            'subfield': 'fiftyone.core.fields.StringField',
                            'embedded_doc_type': None,
                            'db_field': 'tags',
                            'fields': BaseList([]),
                        }>,
                        <SampleFieldDocument: {
                            'name': 'label',
                            'ftype': 'fiftyone.core.fields.StringField',
                            'subfield': None,
                            'embedded_doc_type': None,
                            'db_field': 'label',
                            'fields': BaseList([]),
                        }>,
                        <SampleFieldDocument: {
                            'name': 'points',
                            'ftype': 'fiftyone.core.fields.PolylinePointsField',
                            'subfield': None,
                            'embedded_doc_type': None,
                            'db_field': 'points',
                            'fields': BaseList([]),
                        }>,
                        <SampleFieldDocument: {
                            'name': 'confidence',
                            'ftype': 'fiftyone.core.fields.FloatField',
                            'subfield': None,
                            'embedded_doc_type': None,
                            'db_field': 'confidence',
                            'fields': BaseList([]),
                        }>,
                        <SampleFieldDocument: {
                            'name': 'index',
                            'ftype': 'fiftyone.core.fields.IntField',
                            'subfield': None,
                            'embedded_doc_type': None,
                            'db_field': 'index',
                            'fields': BaseList([]),
                        }>,
                        <SampleFieldDocument: {
                            'name': 'closed',
                            'ftype': 'fiftyone.core.fields.BooleanField',
                            'subfield': None,
                            'embedded_doc_type': None,
                            'db_field': 'closed',
                            'fields': BaseList([]),
                        }>,
                        <SampleFieldDocument: {
                            'name': 'filled',
                            'ftype': 'fiftyone.core.fields.BooleanField',
                            'subfield': None,
                            'embedded_doc_type': None,
                            'db_field': 'filled',
                            'fields': BaseList([]),
                        }>,
                    ]),
                }>,
            ]),
        }>,
        <SampleFieldDocument: {
            'name': 'location',
            'ftype': 'fiftyone.core.fields.EmbeddedDocumentField',
            'subfield': None,
            'embedded_doc_type': 'fiftyone.core.labels.GeoLocation',
            'db_field': 'location',
            'fields': BaseList([
                <SampleFieldDocument: {
                    'name': 'id',
                    'ftype': 'fiftyone.core.fields.ObjectIdField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': '_id',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'tags',
                    'ftype': 'fiftyone.core.fields.ListField',
                    'subfield': 'fiftyone.core.fields.StringField',
                    'embedded_doc_type': None,
                    'db_field': 'tags',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'point',
                    'ftype': 'fiftyone.core.fields.GeoPointField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'point',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'line',
                    'ftype': 'fiftyone.core.fields.GeoLineStringField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'line',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'polygon',
                    'ftype': 'fiftyone.core.fields.GeoPolygonField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'polygon',
                    'fields': BaseList([]),
                }>,
            ]),
        }>,
    ]),
    'frame_fields': EmbeddedDocumentList([
        <SampleFieldDocument: {
            'name': 'id',
            'ftype': 'fiftyone.core.fields.ObjectIdField',
            'subfield': None,
            'embedded_doc_type': None,
            'db_field': '_id',
            'fields': BaseList([]),
        }>,
        <SampleFieldDocument: {
            'name': 'frame_number',
            'ftype': 'fiftyone.core.fields.FrameNumberField',
            'subfield': None,
            'embedded_doc_type': None,
            'db_field': 'frame_number',
            'fields': BaseList([]),
        }>,
        <SampleFieldDocument: {
            'name': '_sample_id',
            'ftype': 'fiftyone.core.fields.ObjectIdField',
            'subfield': None,
            'embedded_doc_type': None,
            'db_field': '_sample_id',
            'fields': BaseList([]),
        }>,
    ]),
    'annotation_runs': BaseDict({}),
    'brain_methods': BaseDict({}),
    'evaluations': BaseDict({}),
    'app_sidebar_groups': None,
}>
brimoor commented 2 years ago

Here's another doc that raises the same error:

<DatasetDocument: {
    'id': '602e73bca51c6913a24e94da',
    'name': 'malaria-cell-images',
    'version': '0.16.2',
    'created_at': None,
    'last_loaded_at': datetime.datetime(2022, 6, 8, 2, 28, 46, 478034),
    'sample_collection_name': 'samples.2021.02.18.09.03.40',
    'frame_collection_name': 'frames.samples.2021.02.18.09.03.40',
    'persistent': True,
    'media_type': 'image',
    'info': BaseDict({'classes': BaseList(['Parasitized', 'Uninfected'])}),
    'classes': BaseDict({}),
    'default_classes': BaseList([]),
    'mask_targets': BaseDict({}),
    'default_mask_targets': BaseDict({}),
    'skeletons': BaseDict({}),
    'default_skeleton': None,
    'sample_fields': EmbeddedDocumentList([
        <SampleFieldDocument: {
            'name': 'id',
            'ftype': 'fiftyone.core.fields.ObjectIdField',
            'subfield': None,
            'embedded_doc_type': None,
            'db_field': '_id',
            'fields': BaseList([]),
        }>,
        <SampleFieldDocument: {
            'name': 'filepath',
            'ftype': 'fiftyone.core.fields.StringField',
            'subfield': None,
            'embedded_doc_type': None,
            'db_field': 'filepath',
            'fields': BaseList([]),
        }>,
        <SampleFieldDocument: {
            'name': 'tags',
            'ftype': 'fiftyone.core.fields.ListField',
            'subfield': 'fiftyone.core.fields.StringField',
            'embedded_doc_type': None,
            'db_field': 'tags',
            'fields': BaseList([]),
        }>,
        <SampleFieldDocument: {
            'name': 'metadata',
            'ftype': 'fiftyone.core.fields.EmbeddedDocumentField',
            'subfield': None,
            'embedded_doc_type': 'fiftyone.core.metadata.ImageMetadata',
            'db_field': 'metadata',
            'fields': BaseList([
                <SampleFieldDocument: {
                    'name': 'size_bytes',
                    'ftype': 'fiftyone.core.fields.IntField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'size_bytes',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'mime_type',
                    'ftype': 'fiftyone.core.fields.StringField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'mime_type',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'width',
                    'ftype': 'fiftyone.core.fields.IntField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'width',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'height',
                    'ftype': 'fiftyone.core.fields.IntField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'height',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'num_channels',
                    'ftype': 'fiftyone.core.fields.IntField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'num_channels',
                    'fields': BaseList([]),
                }>,
            ]),
        }>,
        <SampleFieldDocument: {
            'name': '_media_type',
            'ftype': 'fiftyone.core.fields.StringField',
            'subfield': None,
            'embedded_doc_type': None,
            'db_field': '_media_type',
            'fields': BaseList([]),
        }>,
        <SampleFieldDocument: {
            'name': '_rand',
            'ftype': 'fiftyone.core.fields.FloatField',
            'subfield': None,
            'embedded_doc_type': None,
            'db_field': '_rand',
            'fields': BaseList([]),
        }>,
        <SampleFieldDocument: {
            'name': 'ground_truth',
            'ftype': 'fiftyone.core.fields.EmbeddedDocumentField',
            'subfield': None,
            'embedded_doc_type': 'fiftyone.core.labels.Classification',
            'db_field': 'ground_truth',
            'fields': BaseList([
                <SampleFieldDocument: {
                    'name': 'id',
                    'ftype': 'fiftyone.core.fields.ObjectIdField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': '_id',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'tags',
                    'ftype': 'fiftyone.core.fields.ListField',
                    'subfield': 'fiftyone.core.fields.StringField',
                    'embedded_doc_type': None,
                    'db_field': 'tags',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'label',
                    'ftype': 'fiftyone.core.fields.StringField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'label',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'confidence',
                    'ftype': 'fiftyone.core.fields.FloatField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'confidence',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'logits',
                    'ftype': 'fiftyone.core.fields.VectorField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'logits',
                    'fields': BaseList([]),
                }>,
            ]),
        }>,
        <SampleFieldDocument: {
            'name': 'uniqueness',
            'ftype': 'fiftyone.core.fields.FloatField',
            'subfield': None,
            'embedded_doc_type': None,
            'db_field': 'uniqueness',
            'fields': BaseList([]),
        }>,
        <SampleFieldDocument: {
            'name': 'predictions',
            'ftype': 'fiftyone.core.fields.EmbeddedDocumentField',
            'subfield': None,
            'embedded_doc_type': 'fiftyone.core.labels.Classification',
            'db_field': 'predictions',
            'fields': BaseList([
                <SampleFieldDocument: {
                    'name': 'id',
                    'ftype': 'fiftyone.core.fields.ObjectIdField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': '_id',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'tags',
                    'ftype': 'fiftyone.core.fields.ListField',
                    'subfield': 'fiftyone.core.fields.StringField',
                    'embedded_doc_type': None,
                    'db_field': 'tags',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'label',
                    'ftype': 'fiftyone.core.fields.StringField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'label',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'confidence',
                    'ftype': 'fiftyone.core.fields.FloatField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'confidence',
                    'fields': BaseList([]),
                }>,
                <SampleFieldDocument: {
                    'name': 'logits',
                    'ftype': 'fiftyone.core.fields.VectorField',
                    'subfield': None,
                    'embedded_doc_type': None,
                    'db_field': 'logits',
                    'fields': BaseList([]),
                }>,
            ]),
        }>,
        <SampleFieldDocument: {
            'name': 'hardness',
            'ftype': 'fiftyone.core.fields.FloatField',
            'subfield': None,
            'embedded_doc_type': None,
            'db_field': 'hardness',
            'fields': BaseList([]),
        }>,
        <SampleFieldDocument: {
            'name': 'mistakenness',
            'ftype': 'fiftyone.core.fields.FloatField',
            'subfield': None,
            'embedded_doc_type': None,
            'db_field': 'mistakenness',
            'fields': BaseList([]),
        }>,
        <SampleFieldDocument: {
            'name': 'embeddings',
            'ftype': 'fiftyone.core.fields.VectorField',
            'subfield': None,
            'embedded_doc_type': None,
            'db_field': 'embeddings',
            'fields': BaseList([]),
        }>,
        <SampleFieldDocument: {
            'name': 'eval',
            'ftype': 'fiftyone.core.fields.StringField',
            'subfield': None,
            'embedded_doc_type': None,
            'db_field': 'eval',
            'fields': BaseList([]),
        }>,
    ]),
    'frame_fields': EmbeddedDocumentList([
        <SampleFieldDocument: {
            'name': 'id',
            'ftype': 'fiftyone.core.fields.ObjectIdField',
            'subfield': None,
            'embedded_doc_type': None,
            'db_field': '_id',
            'fields': BaseList([]),
        }>,
        <SampleFieldDocument: {
            'name': 'frame_number',
            'ftype': 'fiftyone.core.fields.FrameNumberField',
            'subfield': None,
            'embedded_doc_type': None,
            'db_field': 'frame_number',
            'fields': BaseList([]),
        }>,
        <SampleFieldDocument: {
            'name': '_sample_id',
            'ftype': 'fiftyone.core.fields.ObjectIdField',
            'subfield': None,
            'embedded_doc_type': None,
            'db_field': '_sample_id',
            'fields': BaseList([]),
        }>,
    ]),
    'annotation_runs': BaseDict({}),
    'brain_methods': BaseDict({}),
    'evaluations': BaseDict({}),
    'app_sidebar_groups': None,
}>
sbucaille commented 2 years ago

Hi,

Same happens to me after trying the following tutorial with custom data. I managed to open CVAT, annotate my data, save in CVAT. But after running view.load_annotations(anno_key) and setting it as session.view, opening the App shows me the same bug.

image

benjaminpkane commented 2 years ago

I'm having trouble reproducing. I've tested with migrating a v0.13.3 dataset, and tried various label types. @brimoor if you have concrete steps, it might help

brimoor commented 2 years ago

malaria-cell-images.zip has the problem when running on https://github.com/voxel51/fiftyone/pull/1829:

import fiftyone as fo

dataset = fo.Dataset.from_dir(
    dataset_dir="/path/to/malaria-cell-images",
    dataset_type=fo.types.FiftyOneDataset,
)

session = fo.launch_app(dataset)
benjaminpkane commented 2 years ago

Ok. Resolved in #1875. The problem is old dataset docs have default frame fields defined, even if it isn't a video dataset.