Repository navigation
fix(flow): don't start the OCR prewarm for --help, and wait for it at exit - #1242
Merged
Merged
Conversation
… exit
`demo` and `tutorial` started loading OCR on a background thread before
the arguments were parsed, so `tutorial --help` did too. When the help
printed and the interpreter exited while onnxruntime was still loading,
the native runtime aborted the process ("terminate called without an
active exception", exit -6). That is the intermittent `agent shim
(py3.12)` failure in test_partner_kit on #1217, #1234 and #1239.
- `-h`, `--help` and `--version` no longer start the prewarm.
- When the prewarm does start, exit waits up to 30 s for the OCR load to
finish instead of tearing it down mid-load.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
openadapt-flow demoandtutorialstarted loading OCR on a background thread before parsing their arguments, sotutorial --helpdid too. If the help printed and Python exited while onnxruntime was still loading, the native runtime aborted the process with exit -6. That is the intermittentagent shim (py3.12)failure (test_default_flow_cli_invokes_the_installed_tutorial_help) that blocks #1217, #1234 and #1239.The help,
-hand--versionflags no longer start the prewarm. When it does start, exit now waits up to 30 seconds for the OCR load to finish rather than tearing it down mid-load.The new tests fail on main (
test_help_does_not_start_the_prewarm, 6 cases) and pass here, along with the rest oftests/test_ocr_backends.py.tutorial --helpexits 0 in five runs in a row locally.🤖 Generated with Claude Code