Skip to content

Commit aaaf057

Browse files
committed
consensus/benchmark and aggregate_annotations_as_df fixes of manual tests
1 parent de8a1cd commit aaaf057

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

superannotate/analytics/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def __get_user_metadata(annotation):
288288
annotations_paths = []
289289

290290
if folder_names is None:
291-
project_dir_content = Path(project_root).glob('*.json')
291+
project_dir_content = Path(project_root).glob('*')
292292
for entry in project_dir_content:
293293
if entry.is_file() and entry.suffix == '.json':
294294
annotations_paths.append(entry)
@@ -374,7 +374,7 @@ def __get_user_metadata(annotation):
374374
attributes = annotation.get("attributes")
375375
user_metadata = __get_user_metadata(annotation)
376376
folder_name = None
377-
if annotation_path.parent.name != '':
377+
if annotation_path.parent != Path(project_root):
378378
folder_name = annotation_path.parent.name
379379
num_added = 0
380380
if not attributes:

superannotate/consensus_benchmark/benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def attribute_to_list(attribute_df):
8181
download_export(project_name, proj_export_meta, export_dir)
8282
project_df = aggregate_annotations_as_df(export_dir)
8383
else:
84-
project_df = aggregate_annotations_as_df(export_dir)
84+
project_df = aggregate_annotations_as_df(export_root)
8585

8686
gt_project_df = project_df[project_df["folderName"] == gt_folder]
8787

superannotate/consensus_benchmark/consensus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def consensus(
4949
download_export(project, proj_export_meta, export_dir)
5050
project_df = aggregate_annotations_as_df(export_dir)
5151
else:
52-
project_df = aggregate_annotations_as_df(export_dir)
52+
project_df = aggregate_annotations_as_df(export_root)
5353

5454
all_projects_df = project_df[project_df["instanceId"].notna()]
5555
all_projects_df = all_projects_df.loc[

0 commit comments

Comments
 (0)