File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
libs/labelbox/src/labelbox
data/serialization/ndjson Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -156,8 +156,11 @@ def _infer_media_type(
156
156
raise ValueError ("Missing annotations while inferring media type" )
157
157
158
158
types = {type (annotation ) for annotation in annotations }
159
+ types_values = {type (annotation .value ) for annotation in annotations }
159
160
data = ImageData
160
- if (TextEntity in types ) or (ConversationEntity in types ):
161
+ if (ObjectAnnotation
162
+ in types ) and ((TextEntity in types_values ) or
163
+ (ConversationEntity in types_values )):
161
164
data = TextData
162
165
elif VideoClassificationAnnotation in types or VideoObjectAnnotation in types :
163
166
data = VideoData
Original file line number Diff line number Diff line change 7
7
from labelbox .schema .data_row import DataRow
8
8
9
9
10
- class DataRowItemBase (ABC , pydantic_compat . BaseModel ):
10
+ class DataRowItemBase (ABC , BaseModel ):
11
11
"""
12
12
Base class for creating payloads for upsert operations.
13
13
"""
You can’t perform that action at this time.
0 commit comments