@@ -338,7 +338,7 @@ def get_annotator_batch(app, campaign, service_ids, batch_idx=None):
338
338
with app .db ["lock" ]:
339
339
annotator_id = service_ids ["annotator_id" ]
340
340
341
- logging .info (f"Acquiring lock for { annotator_id } " )
341
+ logger .info (f"Acquiring lock for { annotator_id } " )
342
342
start = int (time .time ())
343
343
seed = random .seed (str (start ) + str (service_ids .values ()))
344
344
@@ -347,7 +347,7 @@ def get_annotator_batch(app, campaign, service_ids, batch_idx=None):
347
347
try :
348
348
batch_idx = select_batch (db , seed , annotator_id )
349
349
except ValueError as e :
350
- logging .info (str (e ))
350
+ logger .info (str (e ))
351
351
# no available batches
352
352
return []
353
353
else :
@@ -380,10 +380,9 @@ def save_annotations(app, campaign_id, annotation_set, annotator_id):
380
380
with app .db ["lock" ]:
381
381
db = campaign .db
382
382
batch_idx = annotation_set [0 ]["batch_idx" ]
383
- annotator_group = annotation_set [0 ]["annotator_group" ]
384
383
385
384
# select the examples for this batch and annotator group
386
- mask = ( db ["batch_idx" ] == batch_idx ) & ( db [ "annotator_group" ] == annotator_group )
385
+ mask = db ["batch_idx" ] == batch_idx
387
386
388
387
# if the batch is not assigned to this annotator, return an error
389
388
batch_annotator_id = db .loc [mask ].iloc [0 ]["annotator_id" ]
@@ -434,9 +433,7 @@ def save_annotations(app, campaign_id, annotation_set, annotator_id):
434
433
row = row ,
435
434
result = res ,
436
435
)
437
- logger .info (
438
- f"Annotations for { campaign_id } (batch { batch_idx } , annotator group { annotator_group } , annotator { annotator_id } ) saved."
439
- )
436
+ logger .info (f"Annotations for { campaign_id } (batch { batch_idx } , annotator { annotator_id } ) saved." )
440
437
441
438
final_message_html = markdown .markdown (campaign .metadata ["config" ]["final_message" ])
442
439
0 commit comments