Skip to content

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
copilot/sub-pr-994
Mar 24, 2026
Merged

perf: merge master into model runner optimization branch, combining fast-path and counter-based aggregation#1000
patricklundquist merged 2 commits intobolt-runner-perf-optimizations-240856538465656847from
copilot/sub-pr-994

Conversation

Copy link
Contributor

Copilot AI commented Mar 24, 2026

Resolves a merge conflict between this optimization branch and master (d040792), which independently added a fast-path optimization to runner_item_generate.

Why

Both branches optimized runner_item_generate differently — 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:
    • Retains master's pre-allocated _success_status + single-output fast path (skips loop entirely for the common case, O(1) vs O(n))
    • Replaces master's successes = [] list in the multi-output path with the counter-based approach (num_success int, no allocation per output)
    • Uses resp.status.Clear() before mutation on non-success paths to prevent stale proto fields
  • All other changes from master (new vllm_openai_class, CLI fixes, CHANGELOG) auto-merged without conflicts

Tests

Existing unit tests in tests/runners/test_model_runner_unit.py cover 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.

…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
Copilot AI requested a review from patricklundquist March 24, 2026 17:07
@patricklundquist patricklundquist marked this pull request as ready for review March 24, 2026 17:28
@patricklundquist patricklundquist merged commit fa88c87 into bolt-runner-perf-optimizations-240856538465656847 Mar 24, 2026
1 check passed
@patricklundquist patricklundquist deleted the copilot/sub-pr-994 branch March 24, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants