File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
labelbox/data/serialization/ndjson Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -39,4 +39,9 @@ def serialize(
3939 A generator for accessing the ndjson representation of the data
4040 """
4141 for example in NDLabel .from_common (labels ):
42- yield example .dict (by_alias = True , exclude_none = True )
42+ res = example .dict (by_alias = True )
43+ if res .schema_id is None :
44+ res .pop ('schema_id' )
45+ if res .name is None :
46+ res .pop ('name' )
47+ yield res
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ def _create_video_annotations(
9595 if isinstance (
9696 annot ,
9797 (VideoClassificationAnnotation , VideoObjectAnnotation )):
98- video_annotations [annot .name or annot .schema_id ].append (annot )
98+ video_annotations [annot .schema_id or annot .name ].append (annot )
9999
100100 for annotation_group in video_annotations .values ():
101101 consecutive_frames = cls ._get_consecutive_frames (
You can’t perform that action at this time.
0 commit comments