Skip to content

Commit 55521ff

Browse files
committed
Add logs
1 parent a731b32 commit 55521ff

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2385,21 +2385,18 @@ def upload_annotations_from_folder_to_project(
23852385
"When using recursive subfolder parsing same name annotations in different "
23862386
"subfolders will overwrite each other.",
23872387
)
2388-
logger.info(
2389-
"The JSON files should follow specific naming convention."
2390-
" For Vector projects they should be named '<image_name>___objects.json',"
2391-
" for Pixel projects JSON file should be names '<image_name>___pixel.json' and also second mask image"
2392-
" file should be present with the name '<image_name>___save.png'. In both cases image with <image_name>"
2393-
" should be already present on the platform."
2394-
)
2395-
logger.info("Existing annotations will be overwritten.",)
2388+
logger.info("The JSON files should follow a specific naming convention, matching file names already present "
2389+
"on the platform. Existing annotations will be overwritten")
23962390
logger.info(
23972391
"Uploading all annotations from %s to project %s.", folder_path, project_name
23982392
)
23992393

24002394
annotation_paths = get_annotation_paths(
24012395
folder_path, from_s3_bucket, recursive_subfolders
24022396
)
2397+
if not annotation_paths:
2398+
raise AppException("Could not find annotations matching existing items on the platform.")
2399+
24032400
logger.info(
24042401
"Uploading %s annotations to project %s.", len(annotation_paths), project_name
24052402
)

src/superannotate/lib/core/usecases/annotations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def execute(self):
183183
iterations_range = range(
184184
0, len(self.annotations_to_upload), self.AUTH_DATA_CHUNK_SIZE
185185
)
186-
self.reporter.start_progress(iterations_range)
186+
self.reporter.start_progress(iterations_range,description="Uploading Annotations")
187187
for _ in iterations_range:
188188
annotations_to_upload = self.annotations_to_upload[
189189
_ : _ + self.AUTH_DATA_CHUNK_SIZE # noqa: E203

0 commit comments

Comments
 (0)