Skip to content

Perf metrics access fix for CB path - #4442

Merged
mzegla merged 1 commit into
mainfrom
fix_perf_metrics_access
Aug 10, 2026
Merged

mzegla merged 1 commit into
mainfrom
fix_perf_metrics_access

Conversation

@mzegla

@mzegla mzegla commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI lite review requested due to automatic review settings August 10, 2026 14:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR mitigates a race in the continuous batching (CB) execution path where GenAI perf-metrics retrieval can throw/assert shortly after final output is produced, by retrying metrics access and only logging when metrics become available.

Changes:

  • Add retry helpers (tryGetPerfMetrics, tryGetVlmPerfMetrics) that catch ov::Exception and yield briefly before retrying.
  • Update complete/partial response preparation to use the retry helpers and skip perf logging when metrics aren’t available yet.
  • Add <thread> includes to support std::this_thread::yield().

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/llm/visual_language_model/continuous_batching/servable.cpp Adds a retry wrapper around get_vlm_perf_metrics() and guards debug perf logging to avoid race-triggered failures.
src/llm/language_model/continuous_batching/servable.cpp Adds a retry wrapper around get_perf_metrics() and guards debug perf logging to avoid race-triggered failures.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 19 to 23
#include <memory>
#include <stdexcept>
#include <string>
#include <thread>
#include <vector>
Comment on lines 17 to 21
#include <memory>
#include <stdexcept>
#include <string>
#include <thread>
#include <vector>
@mzegla
mzegla merged commit 4794f5c into main Aug 10, 2026
2 checks passed
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.

4 participants