Skip to content

Commit

Permalink
allow that label column is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
mam10eks committed Nov 13, 2024
1 parent 084c9c0 commit 7b78da6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cli/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,9 @@ def prepare_relevance_judgments(
)
# TODO: Instead update existing data and migrate annotations?

group_pool = pool[pool["group"] == group]
group_pool = pool[pool["group"] == group].copy()
if 'label' not in group_pool.columns:
group_pool['label'] = group_pool['query'].map(lambda i: [])
echo(
f"Uploading {len(group_pool)} documents to project '{project.name}'...")
with NamedTemporaryFile() as tmp_file:
Expand Down

0 comments on commit 7b78da6

Please sign in to comment.