Fix graph queue legacy LLM handling#4401
Open
atobiszei wants to merge 6 commits into
Open
Conversation
mzegla
approved these changes
Jul 27, 2026
Comment on lines
+173
to
+178
| if (node.calculator() != "HttpLLMCalculator") { | ||
| continue; | ||
| } | ||
| bool hasExecutionContextSidePacket = false; | ||
| for (const auto& sidePacket : node.input_side_packet()) { | ||
| if (sidePacket.find("LLM_NODE_EXECUTION_CONTEXTS") != std::string::npos) { |
Collaborator
There was a problem hiding this comment.
Would it make sense to wrap names in consts here?
dkalinowski
approved these changes
Jul 27, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates MediaPipe graph-queue handling for legacy HttpLLMCalculator graphs by introducing an execution-context side packet requirement and making OVMS_GRAPH_QUEUE_MAX_SIZE: AUTO resolve to a concrete, container-aware queue size.
Changes:
- Add
LLM_NODE_EXECUTION_CONTEXTSside packet to generated/exported graphs and test graph templates/fixtures. - Resolve graph-queue
AUTOtomin(restWorkers, getCoreCount)and disable graph queue when legacyHttpLLMCalculatorgraphs are missing the execution-context side packet. - Adjust graph-queue related tests and wiring (including Bazel deps) to reflect the new behavior.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/pull_hf_model_test.cpp | Updates expected graph content to include LLM_NODE_EXECUTION_CONTEXTS side packet. |
| src/test/mediapipeflow_test.cpp | Strengthens graph-queue AUTO and legacy-LLM compatibility coverage. |
| src/test/llm/visual_language_model/vlm_legacy_regular.pbtxt | Adds LLM_NODE_EXECUTION_CONTEXTS side packet for LLM node. |
| src/test/llm/visual_language_model/vlm_cb_regular.pbtxt | Adds LLM_NODE_EXECUTION_CONTEXTS side packet for LLM node. |
| src/test/llm/lm_legacy_regular.pbtxt | Adds LLM_NODE_EXECUTION_CONTEXTS side packet for LLM node. |
| src/test/llm/lm_cb_with_tool_parser.pbtxt | Adds LLM_NODE_EXECUTION_CONTEXTS side packet for LLM node. |
| src/test/llm/lm_cb_speculative.pbtxt | Adds LLM_NODE_EXECUTION_CONTEXTS side packet for LLM node. |
| src/test/llm/lm_cb_regular.pbtxt | Adds LLM_NODE_EXECUTION_CONTEXTS side packet for LLM node. |
| src/test/llm/lm_cb_prompt_lookup.pbtxt | Adds LLM_NODE_EXECUTION_CONTEXTS side packet for LLM node. |
| src/test/graph_export_test.cpp | Updates expected exported graph content to include execution-context side packet. |
| src/mediapipe_internal/mediapipegraphdefinition.hpp | Adds resolveAutoQueueSize() declaration. |
| src/mediapipe_internal/mediapipegraphdefinition.cpp | Implements AUTO queue-size resolution and disables queue for legacy LLM graphs missing execution context. |
| src/mediapipe_internal/mediapipegraphconfig.hpp | Simplifies queue-size storage to std::optional<int> and adds clearGraphQueueSize(). |
| src/mediapipe_internal/graphqueue.cpp | Uses member sidePacketMaps consistently during graph helper initialization. |
| src/mediapipe_internal/BUILD | Adds dependency on //src:libovms_systeminfo for core-count based sizing. |
| src/graph_export/graph_export.cpp | Adds execution-context side packet to generated text-generation graph template. |
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.
This makes each requests create new LegacyServableExecutionContext.