Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.
Python ai4sciencedocument-analysisdocxextract-datalayout-analysisocrparserpdfpdf-converterpdf-extractor-llmpdf-extractor-pretrainpdf-extractor-ragpdf-parserpptxpythonxlsx
fix(tests): align infer performance log test with info level and add timing.py copyright header
myhlolic1ada8674f6d
diff --git a/mineru/utils/timing.py b/mineru/utils/timing.pyindex a77ac0b4..bc65cce9 100644--- a/mineru/utils/timing.py+++ b/mineru/utils/timing.py@@ -1,3 +1,4 @@+# Copyright (c) Opendatalab. All rights reserved."""按需记录阶段墙钟耗时,不同步 CUDA,也不改变推理结果。"""from __future__ import annotationsdiff --git a/tests/unittest/test_pdf_analyze_visual_blocks.py b/tests/unittest/test_pdf_analyze_visual_blocks.pyindex 425632b4..08efaccb 100644--- a/tests/unittest/test_pdf_analyze_visual_blocks.py+++ b/tests/unittest/test_pdf_analyze_visual_blocks.py@@ -1060,12 +1060,12 @@ def test_log_infer_performance_uses_unrounded_elapsed(expected_speed: str,) -> None:"""验证性能日志使用原始耗时计算吞吐,并安全处理零耗时。"""- debug_log = MagicMock()- monkeypatch.setattr(analyze.logger, "debug", debug_log)+ info_log = MagicMock()+ monkeypatch.setattr(analyze.logger, "info", info_log)analyze._log_infer_performance("docx", page_count, elapsed)- message = debug_log.call_args.args[0]+ message = info_log.call_args.args[0]assert "file_suffix=docx" in messageassert f"pages={page_count}" in messageassert expected_cost in message