Draft
Conversation
Revert "Check" This reverts commit dddaf1b. Check graph pool TODO: -> this requires additional patch in MP to reset initialized_ flag in CalculatorGraph and verify if that works. Previous MP tests with reruns worked due to using AddVectorSink which changes the underlying graph and does not use OutputStreamPollers. Need to verify if change in MP will enable graph pool or we need to go back to thread pool. Rebase POC MP FW test POC part 2 WIP to stash
a4a8f32 to
bb24c5c
Compare
525c8d8 to
79f91f3
Compare
79f91f3 to
002dc9b
Compare
0c50e49 to
f895c20
Compare
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.
The graph queue pre-initializes a pool of MediaPipe graph instances that are reused across requests, avoiding the overhead of creating and destroying graphs per request. Queue size is resolved during graph validation.
Decision logic (in priority order)
Explicit pbtxt directive — Add a comment in the graph .pbtxt file:
# OVMS_GRAPH_QUEUE_SIZE: AUTO— pool sized tostd::thread::hardware_concurrency()# OVMS_GRAPH_QUEUE_SIZE: <N>— pool of exactly N graphs (must be ≤ hardware threads)# OVMS_GRAPH_QUEUE_SIZE: 0or # OVMS_GRAPH_QUEUE_SIZE: -1 — explicitly disable poolThis directive is always honored, regardless of env var or calculator type.
Environment variable
OVMS_GRAPH_QUEUE_OFF=1— Suppresses the auto-enable default. Does not override an explicit pbtxt directive.If there is no comment in pbtxt file nor environment variable set then graph pool is enabled by default.
Python calculator — If the graph contains PythonExecutorCalculator, the pool is automatically disabled (not yet safe for reuse).
Default — If none of the above apply, the pool is enabled with AUTO sizing.