Skip to content

[BUGFIX][NIXL] quick fix for 'assert self.connector_worker is not None' in get_kv_connector_stats#26851

Merged
jikunshang merged 1 commit intovllm-project:mainfrom
xuechendi:fix_26046
Oct 15, 2025
Merged

[BUGFIX][NIXL] quick fix for 'assert self.connector_worker is not None' in get_kv_connector_stats#26851
jikunshang merged 1 commit intovllm-project:mainfrom
xuechendi:fix_26046

Conversation

@xuechendi
Copy link
Copy Markdown
Contributor

@xuechendi xuechendi commented Oct 14, 2025

Purpose

Propose a quick fix which occurs after #26046

vllm/tests/v1/kv_connector/nixl_integratio/run_accuracy_test.sh
File "/workspace/vllm/vllm/v1/engine/core.py", line 328, in step
engine_core_outputs = self.scheduler.update_from_output(
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/vllm/vllm/v1/core/sched/scheduler.py", line 926, in update_from_output
stats = self.connector.get_kv_connector_stats()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/vllm/vllm/distributed/kv_transfer/kv_connector/v1/nixl_connector.py", line 244, in get_kv_connector_stats
assert self.connector_worker is not None

Test Plan

Test Result


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

Signed-off-by: Chendi Xue <chendi.xue@intel.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly fixes an AssertionError in get_kv_connector_stats within the NixlConnector. The error occurs when this method is called on a scheduler-side connector, where self.connector_worker is expected to be None. The change replaces the assertion with a conditional check, which is the right approach to handle this case gracefully. The fix is well-targeted and effectively resolves the bug.

@jikunshang jikunshang enabled auto-merge (squash) October 15, 2025 00:05
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Oct 15, 2025
@jikunshang jikunshang merged commit bfad142 into vllm-project:main Oct 15, 2025
54 checks passed
bbartels pushed a commit to bbartels/vllm that referenced this pull request Oct 16, 2025
…e' in get_kv_connector_stats (vllm-project#26851)

Signed-off-by: Chendi Xue <chendi.xue@intel.com>
Signed-off-by: bbartels <benjamin@bartels.dev>
lywa1998 pushed a commit to lywa1998/vllm that referenced this pull request Oct 20, 2025
…e' in get_kv_connector_stats (vllm-project#26851)

Signed-off-by: Chendi Xue <chendi.xue@intel.com>
alhridoy pushed a commit to alhridoy/vllm that referenced this pull request Oct 24, 2025
…e' in get_kv_connector_stats (vllm-project#26851)

Signed-off-by: Chendi Xue <chendi.xue@intel.com>
0xrushi pushed a commit to 0xrushi/vllm that referenced this pull request Oct 26, 2025
…e' in get_kv_connector_stats (vllm-project#26851)

Signed-off-by: Chendi Xue <chendi.xue@intel.com>
Signed-off-by: 0xrushi <6279035+0xrushi@users.noreply.github.com>
0xrushi pushed a commit to 0xrushi/vllm that referenced this pull request Oct 26, 2025
…e' in get_kv_connector_stats (vllm-project#26851)

Signed-off-by: Chendi Xue <chendi.xue@intel.com>
Signed-off-by: 0xrushi <6279035+0xrushi@users.noreply.github.com>
rtourgeman pushed a commit to rtourgeman/vllm that referenced this pull request Nov 10, 2025
…e' in get_kv_connector_stats (vllm-project#26851)

Signed-off-by: Chendi Xue <chendi.xue@intel.com>
devpatelio pushed a commit to SumanthRH/vllm that referenced this pull request Nov 29, 2025
…e' in get_kv_connector_stats (vllm-project#26851)

Signed-off-by: Chendi Xue <chendi.xue@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kv-connector ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants