perf: merge master into model runner optimization branch, combining fast-path and counter-based aggregation#1000
Merged
patricklundquist merged 2 commits intobolt-runner-perf-optimizations-240856538465656847from Mar 24, 2026
Conversation
…ining fast-path single-output optimization with counter-based multi-output aggregation Co-authored-by: patricklundquist <1460278+patricklundquist@users.noreply.github.com> Agent-Logs-Url: https://github.com/Clarifai/clarifai-python/sessions/f0c05276-4c5a-4a7b-a438-99f3746bef0a
Copilot
AI
changed the title
[WIP] Perf: Optimize model runner memory and latency
perf: merge master into model runner optimization branch, combining fast-path and counter-based aggregation
Mar 24, 2026
fa88c87
into
bolt-runner-perf-optimizations-240856538465656847
1 check passed
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.
Resolves a merge conflict between this optimization branch and
master(d040792), which independently added a fast-path optimization torunner_item_generate.Why
Both branches optimized
runner_item_generatedifferently — master added a single-output fast path; this branch replaced list-based aggregation with counters. The conflict needed to be resolved without sacrificing either optimization.How
runner_item_generate: Combines both approaches:_success_status+ single-output fast path (skips loop entirely for the common case,O(1)vsO(n))successes = []list in the multi-output path with the counter-based approach (num_successint, no allocation per output)resp.status.Clear()before mutation on non-success paths to prevent stale proto fieldsvllm_openai_class, CLI fixes, CHANGELOG) auto-merged without conflictsTests
Existing unit tests in
tests/runners/test_model_runner_unit.pycover the status aggregation paths affected by the resolution.Notes
⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.