SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2412.07626 · 2024

OmniDocBench: Benchmarking Diverse PDF Document Parsing with Comprehensive Annotations

arXiv · PDF · Open in the Atlas

Code that ran

13 of 15 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 4 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 9 failures of our instrument; 2 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2412.07626.json · badge: /api/ran/2412.07626.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
opendatalab/OmniDocBench canonical (classifier label)
classifier basis: census
13 ran · 2 no recorded run
FunctionStatusWhere it lives
build_metric_page_denominators Ran
ran; our contract draft was wrong, not the code
opendatalab/OmniDocBench/src/runtime/eval_report.py
code served (permissive licence) · get_code("ca38ddb21ef8ef71")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

# Setup code for build_metric_page_denominators

ARGS = {
    'samples': [
        {
            'img_id': 'page_001',
            'metric': 0.95
        },
        {
            'img_id': 'page_002.jpg',
            'metric': 0.87
        },
        {
            'img_id': 'page_003_v2',
            'metric': 0.92
        }
    ],
    'gt_page_names': ['page_001', 'page_002', 'page_003'],
    'expected_metrics': ['TEDS', 'CER', 'WER']
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
build_notebook_metric_summary Ran
ran; our contract draft was wrong, not the code
opendatalab/OmniDocBench/src/runtime/eval_report.py
code served (permissive licence) · get_code("89eb6100e7a1d37a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import math

def _safe_float(value):
    try:
        value = float(value)
    except (TypeError, ValueError):
        return None
    if not math.isfinite(value):
        return None
    return value

def _safe_get(mapping, *path, default=None):
    current = mapping
    for key in path:
        if not isinstance(current, dict) or key not in current:
            return default
        current = current[key]
    return current

def build_notebook_metric_summary(result_all, page_denominators):
    """Mirror tools/generate_result_tables.ipynb cell 2."""
    summary = {'source': 'tools/generate_result_tables.ipynb#cell-2', 'metrics': {}}
    text_edit = _safe_float(_safe_get(result_all, 'text_block', 'all', 'Edit_dist', 'ALL_page_avg'))
    display_formula_cdm = _safe_float(_safe_get(result_all, 'display_formula', 'page', 'CDM', 'ALL'))
    table_teds = _safe_float(_safe_get(result_all, 'table', 'page', 'TEDS', 'ALL'))
    table_teds_structure_only = _safe_float(_safe_get(result_all, 'table', 'page', 'TEDS_structure_only', 'ALL'))
    reading_order_edit = _safe_float(_safe_get(result_all, 'reading_order', 'all', 'Edit_dist', 'ALL_page_avg'))
    summary['metrics']['text_block_Edit_dist'] = {'raw': text_edit, 'page_denominator': _safe_get(page_denominators, 'text_block', 'Edit_dist', 'ALL'), 'notebook_value': text_edit}
    summary['metrics']['display_formula_CDM'] = {'raw': display_formula_cdm, 'page_denominator': _safe_get(page_denominators, 'display_formula', 'CDM', 'ALL'), 'notebook_value': None if display_formula_cdm is None else display_formula_cdm * 100.0}
    summary['metrics']['table_TEDS'] = {'raw': table_teds, 'page_denominator': _safe_get(page_denominators, 'table', 'TEDS', 'ALL'), 'notebook_value': None if table_teds is None else table_teds * 100.0}
    summary['metrics']['table_TEDS_structure_only'] = {'raw': table_teds_structure_only, 'page_denominator': _safe_get(page_denominators, 'table', 'TEDS_structure_only', 'ALL'), 'notebook_value': None if table_teds_structure_only is None else table_teds_structure_only * 100.0}
    summary['metrics']['reading_order_Edit_dist'] = {'raw': reading_order_edit, 'page_denominator': _safe_get(page_denominators, 'reading_order', 'Edit_dist', 'ALL'), 'notebook_value': reading_order_edit}
    if text_edit is not None and display_formula_cdm is not None and (table_teds is not None):
        summary['overall_notebook'] = ((1.0 - text_edit) * 100.0 + display_formula_cdm * 100.0 + table_teds * 100.0) / 3.0
    else:
        summary['overall_notebook'] = None
    return summary


result_all = {
    'text_block': {
        'all': {
            'Edit_dist': {
                'ALL_page_avg': 0.05
            }
        }
    },
    'display_formula': {
        'page': {
            'CDM': {
                'ALL': 0.85
            }
        }
    },
    'table': {
        'page': {
            'TEDS': {
                'ALL': 0.90
            },
            'TEDS_structure_only': {
                'ALL': 0.92
            }
        }
    },
    'reading_order': {
        'all': {
            'Edit_dist': {
                'ALL_page_avg': 0.02
            }
        }
    }
}

page_denominators = {
    'text_block': {
        'Edit_dist': {
            'ALL': 1000
        }
    },
    'display_formula': {
        'CDM': {
            'ALL': 500
        }
    },
    'table': {
        'TEDS': {
            'ALL': 200
        },
        'TEDS_structure_only': {
            'ALL': 200
        }
    },
    'reading_order': {
        'Edit_dist': {
            'ALL': 300
        }
    }
}

ARGS = {
    'result_all': result_all,
    'page_denominators': page_denominators
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
build_save_name Ran
ran; our contract draft was wrong, not the code
opendatalab/OmniDocBench/src/core/pipeline.py
code served (permissive licence) · get_code("cb4301dfcac9b34a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os

# The function accesses task_cfg['dataset']['prediction'].get('data_path')
# and task_cfg['dataset']['ground_truth']['data_path']
# It also accesses task_cfg['dataset'].get('match_method', 'quick_match')

# Build a minimal task_cfg dict that satisfies all these accesses
task_cfg = {
    'dataset': {
        'prediction': {
            'data_path': '/path/to/prediction_file.csv'
        },
        'ground_truth': {
            'data_path': '/path/to/ground_truth_file.json'
        },
        'match_method': 'custom_match'
    }
}

ARGS = {
    'task_cfg': task_cfg
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
build_stage_execution_summary Ran
ran; our contract draft was wrong, not the code
opendatalab/OmniDocBench/src/runtime/eval_report.py
code served (permissive licence) · get_code("11c0d80bcce3305a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

# Analyze the function to understand what it expects
# build_stage_execution_summary takes result_all as a parameter
# It expects result_all to be a dict with:
# - 'match_debug' key containing match debug info
# - other keys that are element names, each containing a dict with 'metric_debug'

# Construct a comprehensive result_all structure that exercises the function

result_all = {
    'match_debug': {
        'workers': 4,
        'match_workers': 4,
        'page_count': 100,
        'quick_match_truncated_timeout_sec': 5.0,
        'match_timeout_sec': 30.0,
        'text_match_fallback_pages': {
            'timeout': ['page1', 'page2', 'page3'],
            'error': ['page4', 'page5'],
            'no_match': []
        },
        'text_match_fallback_counts': {
            'timeout': 3,
            'error': 2,
            'no_match': 0
        }
    },
    'element_1': {
        'metric_debug': {
            'accuracy': {
                'workers': 2,
                'timeout_sec': 10.0,
                'sample_count': 50,
                'timeout_case_count': 2,
                'timeout_cases': [
                    {'img_id': 'img_001', 'gt_idx': 0, 'pred_idx': 1, 'reason': 'timeout'},
                    {'img_id': 'img_002', 'gt_idx': 1, 'pred_idx': 0, 'reason': 'timeout'}
                ],
                'error_case_count': 1,
                'error_cases': [
                    {'img_id': 'img_003', 'gt_idx': 2, 'pred_idx': 3, 'reason': 'value_error'}
                ],
                'exception_case_count': 0,
                'exception_cases': []
            },
            'precision': {
                'workers': 2,
                'timeout_sec': 10.0,
                'sample_count': 50,
                'timeout_case_count': 0,
                'timeout_cases': [],
                'error_case_count': 0,
                'error_cases': [],
                'exception_case_count': 1,
                'exception_cases': [
                    {'img_id': 'img_004', 'case_name': 'exception_case'}
                ]
            }
        }
    },
    'element_2': {
        'metric_debug': {
            'f1_score': {
                'workers': 1,
                'timeout_sec': 15.0,
                'sample_count': 75,
                'timeout_case_count': 1,
                'timeout_cases': [
                    'case_string_1'
                ],
                'error_case_count': 2,
                'error_cases': [
                    'case_string_2',
                    {'case_name': 'case_dict_1'}
                ],
                'exception_case_count': 0,
                'exception_cases': []
            }
        }
    },
    'non_debug_element': {
        'some_other_data': 'should be ignored'
    }
}

ARGS = {
    'result_all': result_all
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_edit_distance_matrix_new Ran
ran, honoured the contract we drafted
opendatalab/OmniDocBench/src/core/matching/match.py
code served (permissive licence) · get_code("361ddd5fb2f646c2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (3, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import Levenshtein
import numpy as np

# The function takes two parameters: gt_lines and matched_lines
# Both should be sequences of strings (lines of text)
# The function computes normalized edit distance between each pair

gt_lines = [
    "hello world",
    "the quick brown fox",
    ""
]

matched_lines = [
    "hello world",
    "the quick brown dog",
    "extra line"
]

ARGS = {
    "gt_lines": gt_lines,
    "matched_lines": matched_lines
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
Levenshtein, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (3, 3) — shape (3, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_full_labels_results Ran
ran; our contract draft was wrong, not the code
opendatalab/OmniDocBench/src/core/metrics.py
code served (permissive licence) · get_code("3520da40faf14d34")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from collections import defaultdict

torch.manual_seed(0)

# Construct sample data matching the expected structure
samples = [
    {
        'gt_attribute': [
            {'color': 'red', 'shape': 'circle'},
            {'size': 'large'}
        ],
        'metric': {
            'accuracy': 0.85,
            'precision': 0.90
        }
    },
    {
        'gt_attribute': [
            {'color': 'blue', 'shape': 'square'},
            {'size': 'small'}
        ],
        'metric': {
            'accuracy': 0.78,
            'precision': 0.88
        }
    },
    {
        'gt_attribute': [
            {'color': 'red', 'shape': 'triangle'}
        ],
        'metric': {
            'accuracy': 0.92,
            'precision': 0.95
        }
    }
]

ARGS = {
    'samples': samples
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tabulate, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_pred_category_type Ran
ran; our contract draft was wrong, not the code
opendatalab/OmniDocBench/src/core/matching/match.py
code served (permissive licence) · get_code("a287771e93998194")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# Construct pred_items: a list of dicts where each dict represents a prediction item
# The function accesses pred_items[pred_idx] and looks for 'fine_category_type' or 'category_type' keys

pred_items = [
    {
        'fine_category_type': 'electronics',
        'category_type': 'general'
    },
    {
        'category_type': 'clothing'
    },
    {
        'fine_category_type': 'sports_equipment',
        'category_type': 'sports'
    }
]

# pred_idx is an integer index to access pred_items
pred_idx = 0

ARGS = {
    'pred_idx': pred_idx,
    'pred_items': pred_items
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_config Ran
ran; our contract draft was wrong, not the code
opendatalab/OmniDocBench/src/core/pipeline.py
code served (permissive licence) · get_code("643b624f3dbd2451")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import io
import os
import pathlib
import tempfile
import yaml

# Create a temporary YAML config file
temp_dir = tempfile.mkdtemp()
config_file = os.path.join(temp_dir, "test_config.yaml")

# Write a valid YAML config
test_config = {
    "model": "test_model",
    "learning_rate": 0.001,
    "batch_size": 32,
    "layers": [64, 128, 256]
}

with io.open(config_file, 'w', encoding='utf-8') as f:
    yaml.dump(test_config, f)

# Construct arguments
ARGS = {
    "config_path": config_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
process_args Ran
ran; our contract draft was wrong, not the code
opendatalab/OmniDocBench/src/core/pipeline.py
code served (permissive licence) · get_code("462931ce8ed635f0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Namespace. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import argparse

def process_args(args):
    parser = argparse.ArgumentParser(description='Run the OmniDocBench public evaluation pipeline.')
    parser.add_argument('--config', '-c', type=str, default='./configs/end2end.yaml')
    return parser.parse_args(args)

# Setup code to construct valid arguments
args_list = ['--config', './my_config.yaml']

ARGS = {
    'args': args_list
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
resolve_cdm_workers Ran
ran, honoured the contract we drafted
opendatalab/OmniDocBench/src/runtime/concurrency.py
code served (permissive licence) · get_code("cbee43d2ecc4107f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
from typing import Any

DEFAULT_CDM_WORKERS = 13

def _as_positive_int(value: Any, default: int) -> int:
    try:
        resolved = int(value)
    except (TypeError, ValueError):
        resolved = int(default)
    return max(1, resolved)

def _env_or_default(env_name: str, default: int) -> int:
    return _as_positive_int(os.getenv(env_name, default), default)

def resolve_cdm_workers(metric_cfg: dict[str, Any] | None) -> int:
    metric_cfg = metric_cfg or {}
    default = _env_or_default('OMNIDOCBENCH_CDM_WORKERS', DEFAULT_CDM_WORKERS)
    return _as_positive_int(metric_cfg.get('cdm_workers', metric_cfg.get('workers', default)), default)

# Test case 1: metric_cfg is None (should use defaults)
ARGS = {
    'metric_cfg': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
resolve_match_workers Ran
ran, honoured the contract we drafted
opendatalab/OmniDocBench/src/runtime/concurrency.py
code served (permissive licence) · get_code("919efacf435b6e47")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
from typing import Any

DEFAULT_MATCH_WORKERS = 13

def _as_positive_int(value: Any, default: int) -> int:
    try:
        resolved = int(value)
    except (TypeError, ValueError):
        resolved = int(default)
    return max(1, resolved)

def _env_or_default(env_name: str, default: int) -> int:
    return _as_positive_int(os.getenv(env_name, default), default)

def resolve_match_workers(dataset_cfg: dict[str, Any] | None) -> int:
    dataset_cfg = dataset_cfg or {}
    default = _env_or_default('OMNIDOCBENCH_MATCH_WORKERS', DEFAULT_MATCH_WORKERS)
    configured = dataset_cfg.get('match_workers', default)
    return _as_positive_int(configured, default)


# Test case 1: None dataset_cfg
ARGS = {
    'dataset_cfg': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
resolve_teds_workers Ran
ran, honoured the contract we drafted
opendatalab/OmniDocBench/src/runtime/concurrency.py
code served (permissive licence) · get_code("17f3204eb9743817")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
from typing import Any

DEFAULT_TEDS_WORKERS = 13

def _as_positive_int(value: Any, default: int) -> int:
    try:
        resolved = int(value)
    except (TypeError, ValueError):
        resolved = int(default)
    return max(1, resolved)

def _env_or_default(env_name: str, default: int) -> int:
    return _as_positive_int(os.getenv(env_name, default), default)

def resolve_teds_workers(metric_cfg: dict[str, Any] | None) -> int:
    metric_cfg = metric_cfg or {}
    default = _env_or_default('OMNIDOCBENCH_TEDS_WORKERS', DEFAULT_TEDS_WORKERS)
    return _as_positive_int(metric_cfg.get('teds_workers', metric_cfg.get('workers', default)), default)

ARGS = {
    'metric_cfg': {'teds_workers': 8}
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sort_nested_dict Ran
ran; our contract draft was wrong, not the code
opendatalab/OmniDocBench/src/core/metrics.py
code served (permissive licence) · get_code("73ff55a713b31dd3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function sort_nested_dict recursively sorts dictionary keys
# It checks if input is a dict, and if so, returns a new dict with sorted keys
# and recursively processes values. Otherwise it returns the value as-is.

# Construct a nested dictionary with various value types to test the function
nested_dict = {
    "zebra": {
        "beta": 42,
        "alpha": "string_value",
        "gamma": [1, 2, 3]
    },
    "apple": {
        "nested": {
            "z_key": torch.tensor([1.0, 2.0, 3.0, 4.0]),
            "a_key": np.array([5, 6, 7, 8])
        },
        "simple": 3.14
    },
    "middle": 100
}

ARGS = {
    "d": nested_dict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_groups Not yet run
unverified (harvested, no recorded run)
opendatalab/OmniDocBench/src/metrics/cal_metric.py
code served (permissive licence) · get_code("f8346cfe1dd760da")
How it ran

no invocation recorded.

get_page_split Not yet run
unverified (harvested, no recorded run)
opendatalab/OmniDocBench/src/core/metrics.py
code served (permissive licence) · get_code("10cc9e5029893cca")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 15 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Document content extraction is a critical task in computer vision, underpinning the data needs of large language models (LLMs) and retrieval-augmented generation (RAG) systems. Despite recent progress, current document parsing methods have not been fairly and comprehensively evaluated due to the narrow coverage of document types and the simplified, unrealistic evaluation procedures in existing benchmarks. To address these gaps, we introduce OmniDocBench, a novel benchmark featuring high-quality annotations across nine document sources, including academic papers, textbooks, and more challenging cases such as handwritten notes and densely typeset newspapers. OmniDocBench supports flexible, multi-level evaluations--ranging from an end-to-end assessment to the task-specific and attribute--based analysis using 19 layout categories and 15 attribute labels. We conduct a thorough evaluation of both pipeline-based methods and end-to-end vision-language models, revealing their strengths and weaknesses across different document types. OmniDocBench sets a new standard for the fair, diverse, and fine-grained evaluation in document parsing. Dataset and code are available at https://github.com/opendatalab/OmniDocBench.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2412.07626")
get_code_for_paper("2412.07626")
have("2412.07626")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2412.07626.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2412.07626.svg)](https://syntology.ai/paper/2412.07626)

Connect an agent — have() is free.