Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changes for inter_ann_diff #151

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions backend/projects/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,14 +527,14 @@ def add_extra_task_data(t, project):
similar_tasks = (
Task.objects.filter(input_data=t.input_data, project_id=project.id)
.filter(task_status=ANNOTATED)
.filter(review_user__isnull=True)
)
curr_response, seen, total_rating, key_values = {}, [], {}, {}
seen, total_rating, key_values = [], {}, {}
for st in similar_tasks:
ann = Annotation.objects.filter(task=st, annotation_status=LABELED)[0]
for r in ann.result:
if "model_responses_json" in r:
model_responses_json = r["model_responses_json"]
curr_response = {}
for mr in model_responses_json:
if "questions_response" in mr:
questions_response = mr["questions_response"]
Expand All @@ -553,7 +553,7 @@ def add_extra_task_data(t, project):
except Exception as e:
pass
break
seen.append(curr_response)
seen.append(curr_response)

for item in seen:
for key, value in item.items():
Expand Down
Loading