Skip to content

Commit

Permalink
fix: In case pred_dict is given to TableEvaluator remove the ".png", …
Browse files Browse the repository at this point in the history
…".jpg" suffixes from doc_id

before trying to match

Signed-off-by: Nikos Livathinos <[email protected]>
  • Loading branch information
nikos-livathinos committed Mar 6, 2025
1 parent 72ee9f2 commit fa3eba6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docling_eval/evaluators/table_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ def __call__(
pred_doc_dict = data[BenchMarkColumns.PREDICTION]
pred_doc = DoclingDocument.model_validate_json(pred_doc_dict)
else:
if doc_id.endswith(".png") or doc_id.endswith(".jpg"):
doc_id = doc_id[:-4]
if doc_id not in pred_dict:
_log.error("Missing pred_doc from dict argument for %s", doc_id)
continue
Expand Down

0 comments on commit fa3eba6

Please sign in to comment.