Skip to content

Commit fcbd344

Browse files
committed
merge
2 parents 37c1f79 + 67bf31c commit fcbd344

File tree

8 files changed

+227
-126
lines changed

8 files changed

+227
-126
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
pydicom>=2.0.0
22
boto3>=1.14.53
3-
requests>=2.25.1
3+
requests=2.26.0
44
requests-toolbelt>=0.9.1
55
tqdm>=4.48.2
66
pillow>=7.2.0

src/superannotate/lib/app/interface/sdk_interface.py

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ def delete_folders(project: str, folder_names: List[str]):
390390

391391

392392
@Trackable
393-
@validate_input
393+
# @validate_input
394394
def get_project_and_folder_metadata(project: Union[str, dict]):
395395
"""Returns project and folder metadata tuple. If folder part is empty,
396396
than returned folder part is set to None.
@@ -884,7 +884,9 @@ def get_project_settings(project: Union[str, dict]):
884884
"""
885885
project_name, folder_name = extract_project_folder(project)
886886
settings = controller.get_project_settings(project_name=project_name)
887-
settings = [BaseSerializers(attribute).serialize() for attribute in settings.data]
887+
settings = [
888+
SettingsSerializer(attribute).serialize() for attribute in settings.data
889+
]
888890
return settings
889891

890892

@@ -2487,20 +2489,22 @@ def upload_annotations_from_folder_to_project(
24872489
failed_annotations = []
24882490
missing_annotations = []
24892491
chunk_size = 10
2490-
for i in tqdm(range(0, len(annotation_paths), chunk_size)):
2491-
response = controller.upload_annotations_from_folder(
2492-
project_name=project_name,
2493-
folder_name=folder_name,
2494-
folder_path=folder_path,
2495-
annotation_paths=annotation_paths[i : i + chunk_size], # noqa: E203
2496-
client_s3_bucket=from_s3_bucket,
2497-
)
2498-
if response.errors:
2499-
logger.warning(response.errors)
2500-
if response.data:
2501-
uploaded_annotations.extend(response.data[0])
2502-
missing_annotations.extend(response.data[1])
2503-
failed_annotations.extend(response.data[2])
2492+
with tqdm(total=len(annotation_paths)) as progress_bar:
2493+
for i in range(0, len(annotation_paths), chunk_size):
2494+
response = controller.upload_annotations_from_folder(
2495+
project_name=project_name,
2496+
folder_name=folder_name,
2497+
folder_path=folder_path,
2498+
annotation_paths=annotation_paths[i : i + chunk_size], # noqa: E203
2499+
client_s3_bucket=from_s3_bucket,
2500+
)
2501+
if response.errors:
2502+
logger.warning(response.errors)
2503+
if response.data:
2504+
uploaded_annotations.extend(response.data[0])
2505+
missing_annotations.extend(response.data[1])
2506+
failed_annotations.extend(response.data[2])
2507+
progress_bar.update(chunk_size)
25042508
return uploaded_annotations, failed_annotations, missing_annotations
25052509

25062510

src/superannotate/lib/core/entities.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,10 @@ def __init__(
225225
folder_id: int = None,
226226
annotator_id: int = None,
227227
annotator_name: str = None,
228+
qa_id: str = None,
229+
qa_name: str = None,
230+
entropy_value: int = None,
231+
approval_status: bool = None,
228232
is_pinned: bool = None,
229233
meta: ImageInfoEntity = ImageInfoEntity(),
230234
):
@@ -236,7 +240,11 @@ def __init__(
236240
self.project_id = project_id
237241
self.annotation_status_code = annotation_status_code
238242
self.folder_id = folder_id
243+
self.qa_id = qa_id
244+
self.qa_name = qa_name
245+
self.entropy_value = entropy_value
239246
self.annotator_id = annotator_id
247+
self.approval_status = approval_status
240248
self.annotator_name = annotator_name
241249
self.is_pinned = is_pinned
242250
self.meta = meta
@@ -250,6 +258,10 @@ def to_dict(self):
250258
"project_id": self.project_id,
251259
"annotation_status": self.annotation_status_code,
252260
"folder_id": self.folder_id,
261+
"qa_id": self.qa_id,
262+
"qa_name": self.qa_name,
263+
"entropy_value": self.entropy_value,
264+
"approval_status": self.approval_status,
253265
"annotator_id": self.annotator_id,
254266
"annotator_name": self.annotator_name,
255267
"is_pinned": self.is_pinned,

0 commit comments

Comments
 (0)