omni-parse-bench 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- omni_parse_bench/__init__.py +24 -0
- omni_parse_bench/benchmark.py +670 -0
- omni_parse_bench/cli.py +268 -0
- omni_parse_bench/equations.py +206 -0
- omni_parse_bench/gold.py +340 -0
- omni_parse_bench/harness/__init__.py +56 -0
- omni_parse_bench/harness/budget.py +75 -0
- omni_parse_bench/harness/contract.py +104 -0
- omni_parse_bench/harness/errors.py +76 -0
- omni_parse_bench/harness/layout.py +50 -0
- omni_parse_bench/harness/page.py +175 -0
- omni_parse_bench/harness/providers/__init__.py +1 -0
- omni_parse_bench/harness/providers/azure.py +170 -0
- omni_parse_bench/harness/providers/datalab.py +149 -0
- omni_parse_bench/harness/providers/extend.py +215 -0
- omni_parse_bench/harness/providers/llamaparse.py +187 -0
- omni_parse_bench/harness/providers/llm.py +277 -0
- omni_parse_bench/harness/providers/mistral.py +123 -0
- omni_parse_bench/harness/providers/reducto.py +198 -0
- omni_parse_bench/harness/providers/tesseract.py +101 -0
- omni_parse_bench/harness/raster.py +32 -0
- omni_parse_bench/harness/registry.py +94 -0
- omni_parse_bench/katex/LICENSE +21 -0
- omni_parse_bench/katex/katex.js +19092 -0
- omni_parse_bench/markdown.py +88 -0
- omni_parse_bench/metric.py +162 -0
- omni_parse_bench/normalize.py +211 -0
- omni_parse_bench/progress.py +399 -0
- omni_parse_bench/runners.py +457 -0
- omni_parse_bench/tables.py +276 -0
- omni_parse_bench/views.py +196 -0
- omni_parse_bench/vocab.py +123 -0
- omni_parse_bench-0.1.0.dist-info/METADATA +272 -0
- omni_parse_bench-0.1.0.dist-info/RECORD +38 -0
- omni_parse_bench-0.1.0.dist-info/WHEEL +4 -0
- omni_parse_bench-0.1.0.dist-info/entry_points.txt +3 -0
- omni_parse_bench-0.1.0.dist-info/licenses/LICENSE +202 -0
- omni_parse_bench-0.1.0.dist-info/licenses/NOTICE +13 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"""Omni Parse Bench: yes/no tests on single pages, graded against a provider's outputs.
|
|
2
|
+
|
|
3
|
+
A benchmark is a set of pages (manifest.parquet) and their tests (gold/). Each test is one yes/no
|
|
4
|
+
question about one page. A test reads one output of a prediction (its `output_type`), checks one
|
|
5
|
+
structure of it (its `test_type`) on pieces of the page's content (its `args`), and is tagged with
|
|
6
|
+
what that content is (its `tags`: in a table, handwritten, Thai, ...), which selects tests and never
|
|
7
|
+
changes a verdict:
|
|
8
|
+
|
|
9
|
+
from omni_parse_bench import gold, score, summarize
|
|
10
|
+
|
|
11
|
+
pages, tests = gold.load("dataset/") # manifest.parquet and gold/*.json
|
|
12
|
+
by_page = gold.by_page(tests)
|
|
13
|
+
verdicts = [v for p in pages for v in score(outputs[p.page_id], by_page[p.page_id])]
|
|
14
|
+
summary = summarize(verdicts, tests, pages)
|
|
15
|
+
|
|
16
|
+
`score` is pure: no files, no network. Producing the outputs is `omni_parse_bench.harness`
|
|
17
|
+
(`pip install 'omni-parse-bench[harness]'`), and nothing here imports it.
|
|
18
|
+
|
|
19
|
+
See docs/design.md for the full design.
|
|
20
|
+
"""
|
|
21
|
+
from omni_parse_bench import gold
|
|
22
|
+
from omni_parse_bench.metric import Verdict, score, summarize
|
|
23
|
+
|
|
24
|
+
__all__ = ["gold", "score", "summarize", "Verdict"]
|