@@ -1540,7 +1540,7 @@ def create_annotation_class(
15401540 name : NotEmptyStr ,
15411541 color : NotEmptyStr ,
15421542 attribute_groups : Optional [List [AttributeGroup ]] = None ,
1543- type : ClassType = "object" ,
1543+ class_type : ClassType = "object" ,
15441544):
15451545 """Create annotation class in project
15461546
@@ -1554,8 +1554,8 @@ def create_annotation_class(
15541554 [ { "name": "tall", "is_multiselect": 0, "attributes": [ { "name": "yes" }, { "name": "no" } ] },
15551555 { "name": "age", "is_multiselect": 0, "attributes": [ { "name": "young" }, { "name": "old" } ] } ]
15561556 :type attribute_groups: list of dicts
1557- :param type : class type
1558- :type type : str
1557+ :param class_type : class type
1558+ :type class_type : str
15591559
15601560 :return: new class metadata
15611561 :rtype: dict
@@ -1570,7 +1570,7 @@ def create_annotation_class(
15701570 name = name ,
15711571 color = color ,
15721572 attribute_groups = attribute_groups ,
1573- class_type = type ,
1573+ class_type = class_type ,
15741574 )
15751575 return BaseSerializers (response .data ).serialize ()
15761576
@@ -1633,7 +1633,6 @@ def create_annotation_classes_from_classes_json(
16331633 :return: list of created annotation class metadatas
16341634 :rtype: list of dicts
16351635 """
1636- classes_json_initial = classes_json
16371636 if isinstance (classes_json , str ) or isinstance (classes_json , Path ):
16381637 if from_s3_bucket :
16391638 from_session = boto3 .Session ()
@@ -1650,11 +1649,7 @@ def create_annotation_classes_from_classes_json(
16501649 annotation_classes = parse_obj_as (List [AnnotationClassEntity ], classes_json )
16511650 except ValidationError :
16521651 raise AppException ("Couldn't validate annotation classes." )
1653- logger .info (
1654- "Creating annotation classes in project %s from %s." ,
1655- project ,
1656- classes_json_initial ,
1657- )
1652+ logger .info (f"Creating annotation classes in project { project } ." )
16581653 response = Controller .get_default ().create_annotation_classes (
16591654 project_name = project , annotation_classes = annotation_classes ,
16601655 )
0 commit comments