Skip to content

Fixing failing test_equations[docling] by caching Docling models before pytest#1287

Merged
jamesbraza merged 2 commits intomainfrom
fixing-failing-equations-test
Feb 12, 2026
Merged

Fixing failing test_equations[docling] by caching Docling models before pytest#1287
jamesbraza merged 2 commits intomainfrom
fixing-failing-equations-test

Conversation

@jamesbraza
Copy link
Copy Markdown
Collaborator

@jamesbraza jamesbraza commented Feb 11, 2026

The test_equations[docling] cassette was failing on Docling model queries. Docling model queries shouldn't be in this cassette, let's just cache it up front.


Note

Low Risk
CI-only changes plus a VCR cassette update; main risk is cache key/path mistakes causing slower or still-flaky CI rather than runtime impact.

Overview
Prevents test_equations[docling] from making unexpected HuggingFace Hub calls during CI by caching and pre-downloading Docling models before pytest runs.

The test-src workflow now restores ~/.cache/docling via actions/cache, downloads layout/tableformer models on cache miss, and sets DOCLING_ARTIFACTS_PATH for the test run. The test_equations[docling] VCR cassette is updated to remove previously recorded HuggingFace API interactions.

Written by Cursor Bugbot for commit e2c52e2. Configure here.

@jamesbraza jamesbraza self-assigned this Feb 11, 2026
@jamesbraza jamesbraza added the bug Something isn't working label Feb 11, 2026
Copilot AI review requested due to automatic review settings February 11, 2026 06:48
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Feb 11, 2026
@dosubot
Copy link
Copy Markdown

dosubot bot commented Feb 11, 2026

Related Documentation

Checked 1 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the failing test_equations[docling] VCR cassette by ensuring Docling model artifacts are cached and downloaded before pytest, preventing HuggingFace Hub calls during cassette playback.

Changes:

  • Removed HuggingFace Hub model metadata interactions from the test_equations[docling] VCR cassette.
  • Added a GitHub Actions cache for Docling artifacts and a pre-download step for required models.
  • Set DOCLING_ARTIFACTS_PATH for the pytest run to point at the cached models directory.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
tests/cassettes/test_equations[docling].yaml Removes Docling/HF model API calls from the recorded cassette to keep playback deterministic.
.github/workflows/tests.yml Caches and pre-downloads Docling models so tests don’t hit HuggingFace during VCR playback.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jamesbraza jamesbraza force-pushed the fixing-failing-equations-test branch from e2c52e2 to 3f0784d Compare February 12, 2026 22:37
@jamesbraza jamesbraza merged commit 8685d9f into main Feb 12, 2026
4 of 7 checks passed
@jamesbraza jamesbraza deleted the fixing-failing-equations-test branch February 12, 2026 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants