Skip to content

Commit 311efda

Browse files
committed
Add log
1 parent d3ecefb commit 311efda

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

src/superannotate/lib/app/analytics/aggregators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import copy
22
import json
3+
from dataclasses import dataclass
34
from pathlib import Path
45
from typing import List
56
from typing import Optional
67
from typing import Union
78

89
import lib.core as constances
910
import pandas as pd
10-
from dataclasses import dataclass
1111
from lib.app.exceptions import AppException
1212
from lib.core import ATTACHED_VIDEO_ANNOTATION_POSTFIX
1313
from lib.core import PIXEL_ANNOTATION_POSTFIX

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,10 @@ def _log_report(self):
223223
logger.warning(template.format("', '".join(values)))
224224
if self.reporter.custom_messages.get("invalid_jsons"):
225225
logger.warning(
226-
f"Couldn't validate {len(self.reporter.custom_messages['invalid_jsons'])}/{len(self._annotations_to_upload + self._missing_annotations)} annotations from {self._folder_path}."
226+
f"Couldn't validate {len(self.reporter.custom_messages['invalid_jsons'])}/"
227+
f"{len(self._annotations_to_upload + self._missing_annotations)} annotations from {self._folder_path}. "
228+
f"Use the validate_annotations function to discover the possible reason(s) for "
229+
f"which an annotation is invalid."
227230
)
228231

229232
def execute(self):

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,7 @@ def execute(self):
10551055
if invited:
10561056
self.reporter.log_info(
10571057
f"Sent team {'admin' if self._set_admin else 'contributor'} invitations"
1058-
f" to {len(to_add)}/{len(self._emails)} users."
1058+
f" to {len(invited)}/{len(self._emails)} users."
10591059
)
10601060
if failed:
10611061
to_skip = set(to_skip)

src/superannotate/version.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
__version__ = "4.2.9b1"
2-

tests/integration/annotations/test_text_annotation_upload.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def test_document_annotation_upload_invalid_json(self):
5858
self.assertEqual(len(failed_annotations), 1)
5959
self.assertEqual(len(missing_annotations), 0)
6060
self.assertIn("Couldn't validate 1/1 annotations", self._caplog.text)
61+
self.assertIn("Use the validate_annotations function to discover the possible reason(s) for which an annotation is invalid.", self._caplog.text)
6162

6263
def test_text_annotation_upload(self):
6364
sa.create_annotation_classes_from_classes_json(self.PROJECT_NAME, self.classes_path)

0 commit comments

Comments
 (0)