File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
libs/labelbox/src/labelbox Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -715,6 +715,7 @@ def create_project(self, **kwargs) -> Project:
715
715
logger .warning (
716
716
"Creating a project without specifying media_type"
717
717
" through this method will soon no longer be supported." )
718
+ media_type_value = None
718
719
719
720
ontology_kind = kwargs .pop ("ontology_kind" , None )
720
721
if ontology_kind and OntologyKind .is_supported (ontology_kind ):
@@ -1262,6 +1263,7 @@ def create_ontology(self,
1262
1263
NOTE caller of this method is expected to set media_type to Conversational if ontology_kind is ModelEvaluation
1263
1264
"""
1264
1265
1266
+ media_type_value = None
1265
1267
if media_type :
1266
1268
if MediaType .is_supported (media_type ):
1267
1269
media_type_value = media_type .value
Original file line number Diff line number Diff line change @@ -48,9 +48,8 @@ def to_editor_task_type(ontology_kind: OntologyKind,
48
48
return editor_task_type
49
49
50
50
@staticmethod
51
- def map_to_editor_task_type (
52
- onotology_kind : OntologyKind ,
53
- media_type : MediaType ) -> Optional [EditorTaskType ]:
51
+ def map_to_editor_task_type (onotology_kind : OntologyKind ,
52
+ media_type : MediaType ) -> EditorTaskType :
54
53
if onotology_kind == OntologyKind .ModelEvaluation and media_type == MediaType .Conversational :
55
54
return EditorTaskType .ModelChatEvaluation
56
55
else :
You can’t perform that action at this time.
0 commit comments