File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -430,6 +430,7 @@ def evaluate(
430430
431431 if modality == EvaluationModality .END2END :
432432 _log .error ("END2END evaluation not supported. " )
433+ return None
433434
434435 elif modality == EvaluationModality .TIMINGS :
435436 timings_evaluator = TimingsEvaluator ()
@@ -463,13 +464,13 @@ def evaluate(
463464
464465 elif modality == EvaluationModality .OCR :
465466 ocr_evaluator = OCREvaluator ()
466- ocr_evaluation = ocr_evaluator (
467+ evaluation = ocr_evaluator ( # type: ignore
467468 idir ,
468469 split = split ,
469470 )
470471
471472 with open (save_fn , "w" ) as fd :
472- json .dump (ocr_evaluation .model_dump (), fd , indent = 2 , sort_keys = True )
473+ json .dump (evaluation .model_dump (), fd , indent = 2 , sort_keys = True )
473474
474475 elif modality == EvaluationModality .READING_ORDER :
475476 readingorder_evaluator = ReadingOrderEvaluator ()
You can’t perform that action at this time.
0 commit comments