Skip to content

Commit 62bcfde

Browse files
committed
move new fields from base object to annotation
1 parent d910439 commit 62bcfde

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

labelbox/data/serialization/ndjson/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ class Config:
3535
class NDAnnotation(NDJsonBase):
3636
name: Optional[str] = None
3737
schema_id: Optional[Cuid] = None
38+
page: Optional[int] = None
39+
unit: Optional[str] = None
3840

3941
@root_validator()
4042
def must_set_one(cls, values):
@@ -50,4 +52,4 @@ def dict(self, *args, **kwargs):
5052
res.pop('name')
5153
if 'schemaId' in res and res['schemaId'] is None:
5254
res.pop('schemaId')
53-
return res
55+
return res

labelbox/data/serialization/ndjson/objects.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121

2222
class NDBaseObject(NDAnnotation):
2323
classifications: List[NDSubclassificationType] = []
24-
page: Optional[int] = None
25-
unit: Optional[str] = None
2624

2725

2826
class VideoSupported(BaseModel):

0 commit comments

Comments
 (0)