Repository navigation
surya-ocr.py: cap surya-ocr below 0.24 so --task table works - #214
Merged
Merged
Conversation
surya 0.24 (2026-11-13) removed the mode= argument from TableRecPredictor.__call__. The script passes mode=table_mode, so every table batch failed with a TypeError, was stored as an error row, and the Job still exited 0. 0.23.0 still has mode= and was the version in use at the last passing smoke test (2026-11-06). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016isSPo9kUNVE79vUKWm9i7
…ass with the cap Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016isSPo9kUNVE79vUKWm9i7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ocr/surya-ocr.py --task tablestopped working on 2026-11-13. This PR capssurya-ocr<0.24to fix it.Cause
surya 0.24.0, released 2026-11-13, removed the
modeargument fromTableRecPredictor.__call__. The script passesmode=table_mode, and itssurya-ocrdependency was unpinned. As a result, every table batch fails withTypeError: ... unexpected keyword argument 'mode'.The script catches the error and stores the batch as error rows. The Job therefore exits successfully and pushes a dataset that holds only
[SURYA GENERATE ERROR].0.23.0 still accepts
mode, and it was the version in use at the last passing smoke test on 2026-11-06.surya-ocr-bucket.pypins 0.20.0, so it is not affected.Smoke tests
All three ran on
a10g-smallwithvllm/vllm-openai:v0.20.1, and each processed 3 rows:main,--task tablecognaize/table-image-html-pairs(train_00005)TypeErrorabove (job)--task table--task ocruv-scripts/ocr-demo--table-mode simpleand--task layoutwere not run.All three runs are recorded in
maintenance/verifications.jsonl, andSTATUS.mdis regenerated.tools/recipe-status.py --checkreports 0 problems.Not changed
A failed batch becomes an error row, and the Job still reports success. That is why this went unnoticed. Whether a recipe should exit non-zero when every row fails is a separate question, so this PR does not change it.
🤖 Generated with Claude Code
https://claude.ai/code/session_016isSPo9kUNVE79vUKWm9i7