Skip to content

Commit

Permalink
Fix re-using batch
Browse files Browse the repository at this point in the history
  • Loading branch information
kasnerz committed Feb 20, 2025
1 parent 88614b0 commit dd8fc2c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions factgenie/crowdsourcing.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,8 @@ def select_batch(db, seed, annotator_id):
assigned_batch = db.loc[
(db["annotator_id"] == annotator_id) & (db["status"] == ExampleStatus.ASSIGNED)
].iloc[0]
logging.info(
f"Reusing batch {assigned_batch['batch_idx']} (annotator group {assigned_batch['annotator_group']})"
)
return assigned_batch["batch_idx"], assigned_batch["annotator_group"]
logging.info(f"Reusing batch {assigned_batch['batch_idx']}")
return assigned_batch["batch_idx"]

# Choose from the batches with the lowest annotator group
free_batches = db[db["status"] == ExampleStatus.FREE]
Expand Down

0 comments on commit dd8fc2c

Please sign in to comment.