Conversation
inference_async drops the required frame_index argument and awaits a plain tuple, so it raises TypeError on any call. Match the sibling Segmentor.inference_async contract: a plain def taking frame_index.
|
Can one of the admins verify this patch? |
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.
Problem
Detector.inference_asyncindemos/smartlab_demo/python/object_detection/detector.pycannot complete for any input — it fails twice over:
inference_multithreadtakesframe_index, but thecall passes only
img_top, img_side→TypeError: missing a required argument: 'frame_index'.inference_multithreadis a plaindefreturning a3-tuple, so even with the argument supplied,
awaitraisesTypeError: object tuple can't be used in 'await' expression.Why this is the intended shape
The parallel class in the same demo already defines the contract —
Segmentor.inference_asyncin
demos/smartlab_demo/python/segmentor.py:109is a plaindeftakingframe_index:And the demo's own working call site passes all three arguments, confirming the arity:
Detector.inference_asynchas no call sites, which is why the breakage has gone unnoticed;the live path goes through
inference_multithreaddirectly.Verification
Replaying the call against the real signature extracted from the file, with the working
demo call site as a control:
The second defect reproduced independently:
Fix
Two lines — align
Detector.inference_asyncwith itsSegmentorsibling:Behaviour of the live
inference_multithreadpath is unchanged.🤖 Generated with Claude Code