Skip to content

Commit

Permalink
bumped the glm version and adjusted the tests
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Staar <[email protected]>
  • Loading branch information
PeterStaar-IBM committed Sep 17, 2024
1 parent 30a0ef6 commit 39a8ecf
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 37 deletions.
44 changes: 18 additions & 26 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ python = "^3.10"
pydantic = "^2.0.0"
docling-core = "^1.3.0"
docling-ibm-models = "^1.1.7"
deepsearch-glm = "^0.21.0"
deepsearch-glm = "^0.21.1"
filetype = "^1.2.0"
pypdfium2 = "^4.30.0"
pydantic-settings = "^2.3.0"
Expand Down
2 changes: 1 addition & 1 deletion tests/data/2203.01017v2.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/data/2206.01062.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/data/2305.03393v1-pg9.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/data/2305.03393v1-pg9.pages.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/data/2305.03393v1.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/data/redp5110.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/data/redp5695.json

Large diffs are not rendered by default.

14 changes: 11 additions & 3 deletions tests/verify_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,18 @@ def verify_tables(doc_pred: DsDocument, doc_true: DsDocument):
for i, row in enumerate(true_item.data):
for j, col in enumerate(true_item.data[i]):

print("true: ", true_item.data[i][j])
print("pred: ", pred_item.data[i][j])

assert (
true_item.data[i][j].text == pred_item.data[i][j].text
), "table-cell does not have the same text"

assert (
true_item.data[i][j].type == pred_item.data[i][j].type
), "table-cell does not have the same type"


return True


Expand Down Expand Up @@ -155,9 +163,9 @@ def verify_conversion_result(
doc_pred_pages, doc_true_pages
), f"Mismatch in PDF cell prediction for {input_path}"

# assert verify_output(
# doc_pred, doc_true
# ), f"Mismatch in JSON prediction for {input_path}"
assert verify_output(
doc_pred, doc_true
), f"Mismatch in JSON prediction for {input_path}"

assert verify_md(
doc_pred_md, doc_true_md
Expand Down

0 comments on commit 39a8ecf

Please sign in to comment.