Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修正了由于结束页id错误导致的文档解析速度计算不准的问题。 #1590

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions magic_pdf/model/doc_analyze_by_custom_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def doc_analyze(
doc_analyze_start = time.time()

if end_page_id is None:
end_page_id = len(dataset)
end_page_id = len(dataset) - 1

for index in range(len(dataset)):
page_data = dataset.get_page(index)
Expand All @@ -190,7 +190,7 @@ def doc_analyze(
doc_analyze_time = round(time.time() - doc_analyze_start, 2)
doc_analyze_speed = round((end_page_id + 1 - start_page_id) / doc_analyze_time, 2)
logger.info(
f'doc analyze time: {round(time.time() - doc_analyze_start, 2)},'
f'doc analyze time: {doc_analyze_time} seconds,'
f' speed: {doc_analyze_speed} pages/second'
)

Expand Down
Loading