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.
Files changed (38) hide show
  1. omni_parse_bench/__init__.py +24 -0
  2. omni_parse_bench/benchmark.py +670 -0
  3. omni_parse_bench/cli.py +268 -0
  4. omni_parse_bench/equations.py +206 -0
  5. omni_parse_bench/gold.py +340 -0
  6. omni_parse_bench/harness/__init__.py +56 -0
  7. omni_parse_bench/harness/budget.py +75 -0
  8. omni_parse_bench/harness/contract.py +104 -0
  9. omni_parse_bench/harness/errors.py +76 -0
  10. omni_parse_bench/harness/layout.py +50 -0
  11. omni_parse_bench/harness/page.py +175 -0
  12. omni_parse_bench/harness/providers/__init__.py +1 -0
  13. omni_parse_bench/harness/providers/azure.py +170 -0
  14. omni_parse_bench/harness/providers/datalab.py +149 -0
  15. omni_parse_bench/harness/providers/extend.py +215 -0
  16. omni_parse_bench/harness/providers/llamaparse.py +187 -0
  17. omni_parse_bench/harness/providers/llm.py +277 -0
  18. omni_parse_bench/harness/providers/mistral.py +123 -0
  19. omni_parse_bench/harness/providers/reducto.py +198 -0
  20. omni_parse_bench/harness/providers/tesseract.py +101 -0
  21. omni_parse_bench/harness/raster.py +32 -0
  22. omni_parse_bench/harness/registry.py +94 -0
  23. omni_parse_bench/katex/LICENSE +21 -0
  24. omni_parse_bench/katex/katex.js +19092 -0
  25. omni_parse_bench/markdown.py +88 -0
  26. omni_parse_bench/metric.py +162 -0
  27. omni_parse_bench/normalize.py +211 -0
  28. omni_parse_bench/progress.py +399 -0
  29. omni_parse_bench/runners.py +457 -0
  30. omni_parse_bench/tables.py +276 -0
  31. omni_parse_bench/views.py +196 -0
  32. omni_parse_bench/vocab.py +123 -0
  33. omni_parse_bench-0.1.0.dist-info/METADATA +272 -0
  34. omni_parse_bench-0.1.0.dist-info/RECORD +38 -0
  35. omni_parse_bench-0.1.0.dist-info/WHEEL +4 -0
  36. omni_parse_bench-0.1.0.dist-info/entry_points.txt +3 -0
  37. omni_parse_bench-0.1.0.dist-info/licenses/LICENSE +202 -0
  38. 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"]