How docling-project/docling-eval works
● Benchmark Modules: Under “docling_eval/benchmarks”, there are multiple subdirectories (cvat_annotation, doclaynet_v1, doclaynet_v2, dpbench, funsd, omnidocbench, tableformer_huggingface_otsl, xfund). These modules encapsulate logic for different evaluation benchmarks. Represent each as a separate node or group of nodes that can be labeled by the benchmark or at least “Benchmark Engines.”
● Converters: The “docling_eval/converters” package (including its models subdirectories) handles the conversion of documents into a format suitable for evaluation. This is an important processing component.
● Visualization: The “docling_eval/visualisation” module handles the transformation of evaluation results into visuals (constants and visualization routines). Indicate this as the result presentation layer.
Relationships and Interactions
● The CLI (front-end) takes user input – options and parameters for evaluation tasks – and then routes these calls.
● Each Benchmark module (like those for DP-Bench and OmniDocBench) acts as a plug-in that uses the common pipeline (converter → evaluator → visualizer). You might group these as “Benchmark Adapters”.
● Optionally, show integration with pre-defined examples and tests (docs/examples and tests directories) that validate the overall flow.
Architectural Patterns and Design Principles
● Modularity: Every functional section (CLI, converters, evaluators, benchmarks, visualization) is cleanly separated into its own Python package.
● Pipeline-based Flow: The process follows a clear sequence of steps where data is converted, evaluated, and then visualized.
● Consistent Interfaces: Although not explicitly shown in the files, the similar structure of “create.py” scripts across different benchmarks suggests a common interface pattern for invoking benchmark evaluations.
Relevant Technologies and Frameworks
● Python Packaging: Use of Poetry (see .github/actions/setup-poetry) suggests an emphasis on dependency management.
● CLI Framework: The CLI is implemented in Python (likely using argparse or click, as implied by the help output).
● Testing & CI: GitHub workflows and pre-commit configurations highlight continuous integration and code quality processes.
● External Evaluations and Visualization: The system relies on standard Python libraries and potentially machine learning / data evaluation frameworks (likely hinted by the references to reading order and table structure evaluators).