Add idle model unload for mediapipe LLM graphs - #4486
Draft
atobiszei wants to merge 18 commits into
Draft
Conversation
Cherry-picked from idle-models branch (65f2bab). Adds UNLOADED state machine, per-graph idle unload, ActiveInferenceGuard, config/schema/metrics additions, and related tests.
Cherry-picked from idle-models branch (ceb9f4d). Adds ModelGroupManager, group_name config field, CLI idle_unload_timeout_seconds, status codes, and model_group_manager tests.
atobiszei
commented
Aug 28, 2026
atobiszei
commented
Aug 28, 2026
atobiszei
commented
Aug 28, 2026
atobiszei
commented
Aug 28, 2026
atobiszei
commented
Aug 31, 2026
atobiszei
commented
Aug 31, 2026
atobiszei
commented
Aug 31, 2026
atobiszei
commented
Aug 31, 2026
Comment on lines
+183
to
+188
| // Idle unload: timestamp (nanoseconds from steady_clock epoch) of the last | ||
| // inference activity. Updated in create() on every inference acquisition and | ||
| // when an in-flight inference finishes (via ActiveInferenceGuard destructor). | ||
| // Held as shared_ptr so executors can safely write to it even after the | ||
| // definition is retired/destroyed — the atomic outlives the definition. | ||
| std::shared_ptr<std::atomic<int64_t>> lastActivityTimeNs; |
Collaborator
Author
There was a problem hiding this comment.
This possibly could be moved to servable definition?
atobiszei
commented
Aug 31, 2026
atobiszei
commented
Aug 31, 2026
atobiszei
commented
Aug 31, 2026
atobiszei
commented
Sep 1, 2026
| // Expect old stream to continue responding until closure | ||
| // Expect new stream to be rejected | ||
| TEST_F(MediapipeStreamFlowAddTest, InferOnUnloadedGraph) { | ||
| TEST_F(MediapipeStreamFlowAddTest, InferOnSleepingGraph) { |
atobiszei
commented
Sep 1, 2026
atobiszei
force-pushed
the
atobisze_idle_servable_loading
branch
from
September 1, 2026 16:16
9a971bb to
069d8c1
Compare
atobiszei
commented
Sep 1, 2026
atobiszei
force-pushed
the
atobisze_idle_servable_loading
branch
from
September 2, 2026 09:39
b07f19d to
7885431
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.
Cherry-picked from idle-models branch (65f2bab).