Skip to content

Commit fdc5f44

Browse files
committed
Update llm upload
1 parent 7d883ad commit fdc5f44

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

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

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ def log_report(
107107

108108
class ItemToUpload(BaseModel):
109109
item: BaseItemEntity
110-
annotation_json: Optional[dict]
111-
path: Optional[str]
112-
file_size: Optional[int]
113-
mask: Optional[io.BytesIO]
110+
annotation_json: Optional[dict] = None
111+
path: Optional[str] = None
112+
file_size: Optional[int] = None
113+
mask: Optional[io.BytesIO] = None
114114

115115
class Config:
116116
arbitrary_types_allowed = True
@@ -282,12 +282,12 @@ def validate_project_type(self):
282282
raise AppException("Unsupported project type.")
283283

284284
def _validate_json(self, json_data: dict) -> list:
285-
if self._project.type >= constants.ProjectType.PIXEL.value:
285+
if self._project.type >= int(constants.ProjectType.PIXEL):
286286
return []
287287
use_case = ValidateAnnotationUseCase(
288288
reporter=self.reporter,
289289
team_id=self._project.team_id,
290-
project_type=self._project.type.value,
290+
project_type=self._project.type,
291291
annotation=json_data,
292292
service_provider=self._service_provider,
293293
)
@@ -2103,8 +2103,7 @@ def execute(self):
21032103
for item_name in uploaded_annotations:
21042104
category = (
21052105
name_annotation_map[item_name]["metadata"]
2106-
.get("item_category", {})
2107-
.get("value")
2106+
.get("item_category", None)
21082107
)
21092108
if category:
21102109
item_id_category_map[name_item_map[item_name].id] = category

tests/integration/work_management/test_pause_resume_user_activity.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ def test_pause_and_resume_user_activity(self):
3636
scapegoat = [
3737
u for u in users if u["role"] == "Contributor" and u["state"] == "Confirmed"
3838
][0]
39-
import pdb
40-
41-
pdb.set_trace()
4239
sa.add_contributors_to_project(self.PROJECT_NAME, [scapegoat["email"]], "QA")
4340
with self.assertLogs("sa", level="INFO") as cm:
4441
sa.pause_user_activity(pk=scapegoat["email"], projects=[self.PROJECT_NAME])

0 commit comments

Comments
 (0)