Skip to content

[Chore] fix spelling in kv_transfer_config variable name#26330

Closed
natoscott wants to merge 1 commit intovllm-project:mainfrom
natoscott:fix-kv_tranfer_config-typo
Closed

[Chore] fix spelling in kv_transfer_config variable name#26330
natoscott wants to merge 1 commit intovllm-project:mainfrom
natoscott:fix-kv_tranfer_config-typo

Conversation

@natoscott
Copy link
Copy Markdown
Contributor

@natoscott natoscott commented Oct 7, 2025

Purpose

Fixes an spelling error on a variable naming (missing 's' in kv_transfer_config).

Test Plan

Ran a 'vllm bench throughput' test to sanity check.

Test Result

All is well.

Signed-off-by: Nathan Scott <nathans@redhat.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 a spelling mistake in the kv_transfer_config variable name across two files, improving code consistency. While reviewing, I identified a potential issue in KVConnectorLogging.__init__ where an instance attribute might not be initialized in all code paths. I've provided a suggestion to make the code more robust against potential AttributeError exceptions.

Comment on lines +50 to 58
def __init__(self, kv_transfer_config: KVTransferConfig):
# This should be called on frontend process.
assert not has_kv_transfer_group()
# Instantiate the connector's stats class.
if kv_tranfer_config and kv_tranfer_config.kv_connector:
if kv_transfer_config and kv_transfer_config.kv_connector:
self.connector_cls = KVConnectorFactory.get_connector_class(
kv_tranfer_config
kv_transfer_config
)
self.reset()
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.

high

The attribute self.connector_cls is only initialized within the if block. If the condition is false, self.connector_cls is never set. While the current call site for observe() seems to be safe, this can lead to an AttributeError in the future if observe() is called. It's best practice to initialize all instance attributes in __init__. Consider initializing self.connector_cls to None before the conditional block to make the class more robust.

Suggested change
def __init__(self, kv_transfer_config: KVTransferConfig):
# This should be called on frontend process.
assert not has_kv_transfer_group()
# Instantiate the connector's stats class.
if kv_tranfer_config and kv_tranfer_config.kv_connector:
if kv_transfer_config and kv_transfer_config.kv_connector:
self.connector_cls = KVConnectorFactory.get_connector_class(
kv_tranfer_config
kv_transfer_config
)
self.reset()
def __init__(self, kv_transfer_config: KVTransferConfig):
# This should be called on frontend process.
assert not has_kv_transfer_group()
# Instantiate the connector's stats class.
self.connector_cls = None
if kv_transfer_config and kv_transfer_config.kv_connector:
self.connector_cls = KVConnectorFactory.get_connector_class(
kv_transfer_config
)
self.reset()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not something introduced by this PR, and while not ideal, we would hit the AttributeError here:

assert self.connector_cls is not None

which is fine

@markmc markmc added ready ONLY add when PR is ready to merge/full CI is needed kv-connector and removed kv-connector labels Oct 8, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 7, 2026

This pull request has been automatically marked as stale because it has not had any activity within 90 days. It will be automatically closed if no further activity occurs within 30 days. Leave a comment if you feel this pull request should remain open. Thank you!

@github-actions github-actions bot added the stale Over 90 days of inactivity label Jan 7, 2026
@markmc
Copy link
Copy Markdown
Member

markmc commented Jan 13, 2026

Fixed by #29674, thanks!

@markmc markmc closed this Jan 13, 2026
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 stale Over 90 days of inactivity v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants