Skip to content

CI follow-ups: table compile test compares no values; pretrained-model cache gets evicted #2171

Closed

Description

@quotentiroler

Two follow-ups found while profiling the pytorch test job for #2170.

1. The tablecenternet compile test does not compare outputs

test_torch_compiled_models in tests/pytorch/test_models_table_structure_pt.py says "Compare that outputs are close", but only asserts len(out) == len(compiled_out) == 1 and that the cells/num_rows/num_cols keys exist. The input is random noise, and on it the predictor returns no cells (checked locally), so nothing is compared even in principle. A real table image, or a comparison of the raw model outputs at atol=1e-4 like the detection test does, would make it catch a compile regression.

2. The pretrained-model cache is evicted most of the time

doctr-models-${{ github.job }}-v1 is about 5.7 GB, and the repo's cache limit is 10 GB. In 29 of the last 40 pytest-torch runs the restore missed. A PR run that misses saves its own PR-scoped 5.7 GB copy, which pushes main's entry out, and the next run misses again. A miss costs about 50 to 100 s per run. A possible fix is to restore with actions/cache/restore on pull requests and save only on pushes to main, so PR runs reuse main's copy without evicting it.

Activity

  1. felixdittrich92 commented on Oct 16, 2026

    @felixdittrich92
    Collaborator

    Hi @quotentiroler 👋,

    Thanks for the issue.

    For point one I have uploaded an example image we can use:
    https://github.com/mindee/doctr/releases/download/v1.1.0/table_structure_example.png
    This would require another fixture in conftest.py like the mock_payslip:

    def mock_payslip(tmpdir_factory):

    Feel free to open 2 PRs for both points 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions