Skip to content

[CI][AMD][BugFix][P/D] Add default_vllm_config to test_moriio_connector.py so tests pass#33739

Merged
vllm-bot merged 17 commits intovllm-project:mainfrom
rasmith:rasmith_fix_moriio_test
Feb 20, 2026
Merged

[CI][AMD][BugFix][P/D] Add default_vllm_config to test_moriio_connector.py so tests pass#33739
vllm-bot merged 17 commits intovllm-project:mainfrom
rasmith:rasmith_fix_moriio_test

Conversation

@rasmith
Copy link
Contributor

@rasmith rasmith commented Feb 3, 2026

Purpose

test_moriio_handshake_returns_metadata and test_register_kv_caches do not make use of the set_vllm_config fixture and both result in this error when being ran:

    def get_current_vllm_config() -> VllmConfig:
        if _current_vllm_config is None:
>           raise AssertionError(
                "Current vLLM config is not set. This typically means "
                "get_current_vllm_config() was called outside of a "
                "set_current_vllm_config() context, or a CustomOp was instantiated "
                "at module import time or model forward time when config is not set. "
                "For tests that directly test custom ops/modules, use the "
                "'default_vllm_config' pytest fixture from tests/conftest.py."
            )
E           AssertionError: Current vLLM config is not set. This typically means get_current_vllm_config() was called outside of a set_current_vllm_config() context, or a CustomOp was instantiated at module import time or model forward time when config is not set. For tests that directly test custom ops/modules, use the 'default_vllm_config' pytest fixture from tests/conftest.py.

../../../../vllm/config/vllm.py:1464: AssertionError

Test Plan

pytest -sv test_moriio_connector.py

Test Result

5 passed, 3 warnings in 5.72s

Essential Elements of an Effective PR Description Checklist
  • [ X] The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • [ X] The test plan, such as providing test command.
  • [ X] 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: Randall Smith <Randall.Smith@amd.com>
@mergify mergify bot added rocm Related to AMD ROCm v1 bug Something isn't working kv-connector labels Feb 3, 2026
@github-project-automation github-project-automation bot moved this to Todo in AMD Feb 3, 2026
Copy link
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 aims to fix two failing tests by adding the default_vllm_config fixture. While this resolves the initial AssertionError, it likely introduces a more subtle issue. The default_vllm_config fixture provides a default VllmConfig where model_config is None, but the code path exercised by these tests requires a model_config to be set. This could lead to an AttributeError during test execution.

I've provided comments on both test functions suggesting a more robust fix: using set_current_vllm_config with the vllm_config object created within each test. This will ensure the correct configuration is used throughout the test's execution.

@rasmith
Copy link
Contributor Author

rasmith commented Feb 18, 2026

@ApostaC @orozery Would it be possible to get a review for this, please?

@orozery
Copy link
Collaborator

orozery commented Feb 18, 2026

Can you show the full output of the failing test? (including the failed assertion callstack)
Also cc @tjtanaa @inkcherry

@rasmith
Copy link
Contributor Author

rasmith commented Feb 18, 2026

Can you show the full output of the failing test? (including the failed assertion callstack) Also cc @tjtanaa @inkcherry

Here you go @orozery. @tjtanaa is OOO from what I understand.

/usr/local/lib/python3.12/dist-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"

  warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
===================================================================== test session starts ======================================================================
platform linux -- Python 3.12.12, pytest-8.3.5, pluggy-1.6.0 -- /usr/bin/python3
cachedir: .pytest_cache
hypothesis profile 'default'
rootdir: /vllm-upstream
configfile: pyproject.toml
plugins: rerunfailures-14.0, asyncio-0.24.0, shard-0.1.2, anyio-4.6.2.post1, forked-1.6.0, hydra-core-1.3.2, cov-6.3.0, schemathesis-3.39.15, hypothesis-6.151.5, subtests-0.14.2, timeout-2.3.1, typeguard-4.3.0
asyncio: mode=Mode.STRICT, default_loop_scope=None
collecting ... INFO 02-18 17:19:10 [moriio_engine.py:53] MoRIIO is available
INFO 02-18 17:19:10 [moriio_connector.py:77] MoRIIO is available
WARNING 02-18 17:19:11 [interface.py:584] Current platform cuda does not have '_pytestfixturefunction' attribute.
WARNING 02-18 17:19:12 [interface.py:584] Current platform cuda does not have '__test__' attribute.
WARNING 02-18 17:19:12 [interface.py:584] Current platform cuda does not have '__bases__' attribute.
WARNING 02-18 17:19:12 [interface.py:584] Current platform cuda does not have '__test__' attribute.
WARNING 02-18 17:19:12 [interface.py:584] Current platform cuda does not have '_schemathesis_test' attribute.
collected 5 items
Running 5 items in this shard: tests/v1/kv_connector/unit/test_moriio_connector.py::test_write_mode_saves_local_block_ids, tests/v1/kv_connector/unit/test_moriio_connector.py::test_write_mode_with_chunked_prefill_saves_local_block_ids, tests/v1/kv_connector/unit/test_moriio_connector.py::test_read_mode_loads_remote_block_ids, tests/v1/kv_connector/unit/test_moriio_connector.py::test_register_kv_caches, tests/v1/kv_connector/unit/test_moriio_connector.py::test_moriio_handshake_returns_metadata

test_moriio_connector.py::test_write_mode_saves_local_block_ids INFO 02-18 17:19:12 [scheduler.py:224] Chunked prefill is enabled with max_num_batched_tokens=64.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 02-18 17:19:12 [model.py:529] Resolved architecture: OPTForCausalLM
WARNING 02-18 17:19:12 [model.py:1873] Casting torch.float16 to torch.bfloat16.
INFO 02-18 17:19:12 [model.py:1548] Using max model len 2048
INFO 02-18 17:19:12 [vllm.py:673] Asynchronous scheduling is enabled.
WARNING 02-18 17:19:12 [vllm.py:1046] Turning off hybrid kv cache manager because `--kv-transfer-config` is set. This will reduce the performance of vLLM on LLMs with sliding window attention or Mamba attention. If you are a developer of kv connector, please consider supporting hybrid kv cache manager for your connector by making sure your connector is a subclass of `SupportsHMA` defined in kv_connector/v1/base.py and use --no-disable-hybrid-kv-cache-manager to start vLLM.
INFO 02-18 17:19:13 [factory.py:64] Creating v1 connector with name: MoRIIOConnector and engine_id: 6ef85ee3-014a-4e25-abd8-998245ec22ce
WARNING 02-18 17:19:13 [base.py:166] Initializing KVConnectorBase_V1. This API is experimental and subject to change in the future as we iterate the design.
WARNING 02-18 17:19:13 [base.py:178] KVConnectorBase_V1 initialized without kv_cache_config. This is deprecated - please update your connector to accept kv_cache_config as the third constructor argument and pass it to super().__init__().
INFO 02-18 17:19:13 [moriio_connector.py:255] Initializing MoRIIO Scheduler engine_id = 10.7.79.60:6301
INFO 02-18 17:19:13 [moriio_connector.py:117] Initialized MoRIIO Connector,engine_id:10.7.79.60:6301,role: 0
PASSED
test_moriio_connector.py::test_write_mode_with_chunked_prefill_saves_local_block_ids INFO 02-18 17:19:13 [scheduler.py:224] Chunked prefill is enabled with max_num_batched_tokens=64.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 02-18 17:19:13 [model.py:529] Resolved architecture: OPTForCausalLM
WARNING 02-18 17:19:13 [model.py:1873] Casting torch.float16 to torch.bfloat16.
INFO 02-18 17:19:13 [model.py:1548] Using max model len 2048
WARNING 02-18 17:19:13 [vllm.py:1046] Turning off hybrid kv cache manager because `--kv-transfer-config` is set. This will reduce the performance of vLLM on LLMs with sliding window attention or Mamba attention. If you are a developer of kv connector, please consider supporting hybrid kv cache manager for your connector by making sure your connector is a subclass of `SupportsHMA` defined in kv_connector/v1/base.py and use --no-disable-hybrid-kv-cache-manager to start vLLM.
INFO 02-18 17:19:13 [factory.py:64] Creating v1 connector with name: MoRIIOConnector and engine_id: ae603205-30cb-48c6-8d4a-6732ea73fd3f
WARNING 02-18 17:19:13 [base.py:166] Initializing KVConnectorBase_V1. This API is experimental and subject to change in the future as we iterate the design.
WARNING 02-18 17:19:13 [base.py:178] KVConnectorBase_V1 initialized without kv_cache_config. This is deprecated - please update your connector to accept kv_cache_config as the third constructor argument and pass it to super().__init__().
INFO 02-18 17:19:13 [moriio_connector.py:255] Initializing MoRIIO Scheduler engine_id = 10.7.79.60:6301
INFO 02-18 17:19:13 [moriio_connector.py:117] Initialized MoRIIO Connector,engine_id:10.7.79.60:6301,role: 0
PASSED
test_moriio_connector.py::test_read_mode_loads_remote_block_ids INFO 02-18 17:19:14 [scheduler.py:224] Chunked prefill is enabled with max_num_batched_tokens=64.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 02-18 17:19:14 [model.py:529] Resolved architecture: OPTForCausalLM
WARNING 02-18 17:19:14 [model.py:1873] Casting torch.float16 to torch.bfloat16.
INFO 02-18 17:19:14 [model.py:1548] Using max model len 2048
WARNING 02-18 17:19:14 [vllm.py:1046] Turning off hybrid kv cache manager because `--kv-transfer-config` is set. This will reduce the performance of vLLM on LLMs with sliding window attention or Mamba attention. If you are a developer of kv connector, please consider supporting hybrid kv cache manager for your connector by making sure your connector is a subclass of `SupportsHMA` defined in kv_connector/v1/base.py and use --no-disable-hybrid-kv-cache-manager to start vLLM.
INFO 02-18 17:19:14 [factory.py:64] Creating v1 connector with name: MoRIIOConnector and engine_id: f18a94c8-36f5-47d3-8e43-29e492ca5f0e
WARNING 02-18 17:19:14 [base.py:166] Initializing KVConnectorBase_V1. This API is experimental and subject to change in the future as we iterate the design.
WARNING 02-18 17:19:14 [base.py:178] KVConnectorBase_V1 initialized without kv_cache_config. This is deprecated - please update your connector to accept kv_cache_config as the third constructor argument and pass it to super().__init__().
INFO 02-18 17:19:14 [moriio_connector.py:255] Initializing MoRIIO Scheduler engine_id = 10.7.79.60:6301
INFO 02-18 17:19:14 [moriio_connector.py:117] Initialized MoRIIO Connector,engine_id:10.7.79.60:6301,role: 0
PASSED
test_moriio_connector.py::test_register_kv_caches INFO 02-18 17:19:14 [scheduler.py:224] Chunked prefill is enabled with max_num_batched_tokens=64.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 02-18 17:19:15 [model.py:529] Resolved architecture: OPTForCausalLM
WARNING 02-18 17:19:15 [model.py:1873] Casting torch.float16 to torch.bfloat16.
INFO 02-18 17:19:15 [model.py:1548] Using max model len 2048
WARNING 02-18 17:19:15 [vllm.py:1046] Turning off hybrid kv cache manager because `--kv-transfer-config` is set. This will reduce the performance of vLLM on LLMs with sliding window attention or Mamba attention. If you are a developer of kv connector, please consider supporting hybrid kv cache manager for your connector by making sure your connector is a subclass of `SupportsHMA` defined in kv_connector/v1/base.py and use --no-disable-hybrid-kv-cache-manager to start vLLM.
WARNING 02-18 17:19:15 [base.py:166] Initializing KVConnectorBase_V1. This API is experimental and subject to change in the future as we iterate the design.
WARNING 02-18 17:19:15 [base.py:178] KVConnectorBase_V1 initialized without kv_cache_config. This is deprecated - please update your connector to accept kv_cache_config as the third constructor argument and pass it to super().__init__().
INFO 02-18 17:19:15 [moriio_connector.py:573] Initializing MoRIIO worker 10.7.79.60:6301
INFO 02-18 17:19:15 [moriio_connector.py:641] Initializing MoRIIO Engine, engine = <mori.io.engine.IOEngine object at 0x7f63025d0ef0>, role = consumer
FAILED
test_moriio_connector.py::test_moriio_handshake_returns_metadata INFO 02-18 17:19:16 [scheduler.py:224] Chunked prefill is enabled with max_num_batched_tokens=64.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 02-18 17:19:17 [model.py:529] Resolved architecture: OPTForCausalLM
WARNING 02-18 17:19:17 [model.py:1873] Casting torch.float16 to torch.bfloat16.
INFO 02-18 17:19:17 [model.py:1548] Using max model len 2048
WARNING 02-18 17:19:17 [vllm.py:1046] Turning off hybrid kv cache manager because `--kv-transfer-config` is set. This will reduce the performance of vLLM on LLMs with sliding window attention or Mamba attention. If you are a developer of kv connector, please consider supporting hybrid kv cache manager for your connector by making sure your connector is a subclass of `SupportsHMA` defined in kv_connector/v1/base.py and use --no-disable-hybrid-kv-cache-manager to start vLLM.
WARNING 02-18 17:19:17 [base.py:166] Initializing KVConnectorBase_V1. This API is experimental and subject to change in the future as we iterate the design.
WARNING 02-18 17:19:17 [base.py:178] KVConnectorBase_V1 initialized without kv_cache_config. This is deprecated - please update your connector to accept kv_cache_config as the third constructor argument and pass it to super().__init__().
INFO 02-18 17:19:17 [moriio_connector.py:573] Initializing MoRIIO worker 10.7.79.60:57443
INFO 02-18 17:19:17 [moriio_connector.py:641] Initializing MoRIIO Engine, engine = <mori.io.engine.IOEngine object at 0x7f63025e6330>, role = consumer
FAILED

=========================================================================== FAILURES ===========================================================================
___________________________________________________________________ test_register_kv_caches ____________________________________________________________________

mock_parallel_groups = <MagicMock id='140063215183264'>

    @pytest.mark.skipif(
        not aiter_available, reason="Requires aiter package for ROCm FlashAttention backend"
    )
    def test_register_kv_caches(mock_parallel_groups):
        """Test that MoRIIOConnector.register_kv_caches correctly registers kv caches."""
        ROLE = "kv_consumer"
        IP = get_ip()
        vllm_config = create_vllm_config(role=ROLE)
        DEFAULT_PORT = 6301
        TP_RANK = 0
        DP_RANK = 0
        from vllm.v1.attention.backends.rocm_aiter_fa import AiterFlashAttentionBackend

        backend_cls = AiterFlashAttentionBackend

        # Create test kv cache tensors using proper backend shape
        kv_cache_shape = backend_cls.get_kv_cache_shape(
            num_blocks=2, block_size=16, num_kv_heads=4, head_size=64
        )
        shared_tensor = torch.zeros(*kv_cache_shape, dtype=torch.float16)
        unique_tensor = torch.zeros(*kv_cache_shape, dtype=torch.float16)
        kv_caches = {
            "layer0": shared_tensor,
            "layer1": unique_tensor,
            "layer2": shared_tensor,
        }

        with (
            patch(
                "vllm.distributed.kv_transfer.kv_connector.v1.moriio.moriio_connector.threading.Event"
            ),
            patch(
                "vllm.distributed.kv_transfer.kv_connector.v1.moriio.moriio_connector.threading.Thread"
            ),
        ):
            # Create connector
            vllm_config.kv_transfer_config.kv_connector_extra_config.update(
                {
                    "proxy_ip": "127.0.0.1",
                    "proxy_ping_port": 12345,
                    "http_port": 12346,
                }
            )

>           connector = MoRIIOConnector(vllm_config, KVConnectorRole.WORKER)

test_moriio_connector.py:436:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../../../vllm/distributed/kv_transfer/kv_connector/v1/moriio/moriio_connector.py:116: in __init__
    self.connector_worker = MoRIIOConnectorWorker(vllm_config, self.engine_id)
../../../../vllm/distributed/kv_transfer/kv_connector/v1/moriio/moriio_connector.py:725: in __init__
    backend = get_attn_backend(
../../../../vllm/v1/attention/selector.py:68: in get_attn_backend
    vllm_config = get_current_vllm_config()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    def get_current_vllm_config() -> VllmConfig:
        if _current_vllm_config is None:
>           raise AssertionError(
                "Current vLLM config is not set. This typically means "
                "get_current_vllm_config() was called outside of a "
                "set_current_vllm_config() context, or a CustomOp was instantiated "
                "at module import time or model forward time when config is not set. "
                "For tests that directly test custom ops/modules, use the "
                "'default_vllm_config' pytest fixture from tests/conftest.py."
            )
E           AssertionError: Current vLLM config is not set. This typically means get_current_vllm_config() was called outside of a set_current_vllm_config() context, or a CustomOp was instantiated at module import time or model forward time when config is not set. For tests that directly test custom ops/modules, use the 'default_vllm_config' pytest fixture from tests/conftest.py.

../../../../vllm/config/vllm.py:1527: AssertionError
____________________________________________________________ test_moriio_handshake_returns_metadata ____________________________________________________________

mock_parallel_groups = <MagicMock id='140063220418800'>

    @pytest.mark.skipif(
        not aiter_available, reason="Requires aiter package for ROCm FlashAttention backend"
    )
    def test_moriio_handshake_returns_metadata(mock_parallel_groups):
        """MoRIIO handshake socket returns valid agent metadata over ZMQ."""

        ROLE = "kv_consumer"
        vllm_config = create_vllm_config(role=ROLE)
        from vllm.v1.attention.backends.rocm_aiter_fa import AiterFlashAttentionBackend

        backend_cls = AiterFlashAttentionBackend

        # Create test kv cache tensors using proper backend shape
        kv_cache_shape = backend_cls.get_kv_cache_shape(
            num_blocks=2, block_size=16, num_kv_heads=4, head_size=64
        )
        shared_tensor = torch.zeros(*kv_cache_shape, dtype=torch.float16)
        unique_tensor = torch.zeros(*kv_cache_shape, dtype=torch.float16)
        kv_caches = {
            "layer0": shared_tensor,
            "layer1": unique_tensor,
            "layer2": shared_tensor,
        }

        with (
            patch(
                "vllm.distributed.kv_transfer.kv_connector.v1.moriio.moriio_engine.MoRIIOWrapper",
                FakeMorIIOWrapper,
            ),
        ):
            handshake_port = _find_free_port()
            # Create connector
            vllm_config.kv_transfer_config.kv_connector_extra_config.update(
                {
                    "proxy_ip": "127.0.0.1",
                    "proxy_ping_port": 12345,
                    "http_port": 12346,
                    "handshake_port": handshake_port,
                }
            )
>           connector = MoRIIOConnector(vllm_config, KVConnectorRole.WORKER)

test_moriio_connector.py:526:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../../../vllm/distributed/kv_transfer/kv_connector/v1/moriio/moriio_connector.py:116: in __init__
    self.connector_worker = MoRIIOConnectorWorker(vllm_config, self.engine_id)
../../../../vllm/distributed/kv_transfer/kv_connector/v1/moriio/moriio_connector.py:725: in __init__
    backend = get_attn_backend(
../../../../vllm/v1/attention/selector.py:68: in get_attn_backend
    vllm_config = get_current_vllm_config()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    def get_current_vllm_config() -> VllmConfig:
        if _current_vllm_config is None:
>           raise AssertionError(
                "Current vLLM config is not set. This typically means "
                "get_current_vllm_config() was called outside of a "
                "set_current_vllm_config() context, or a CustomOp was instantiated "
                "at module import time or model forward time when config is not set. "
                "For tests that directly test custom ops/modules, use the "
                "'default_vllm_config' pytest fixture from tests/conftest.py."
            )
E           AssertionError: Current vLLM config is not set. This typically means get_current_vllm_config() was called outside of a set_current_vllm_config() context, or a CustomOp was instantiated at module import time or model forward time when config is not set. For tests that directly test custom ops/modules, use the 'default_vllm_config' pytest fixture from tests/conftest.py.

../../../../vllm/config/vllm.py:1527: AssertionError
======================================================================= warnings summary =======================================================================
<frozen importlib._bootstrap>:488
  <frozen importlib._bootstrap>:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute

<frozen importlib._bootstrap>:488
  <frozen importlib._bootstrap>:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute

../../../../../usr/local/lib/python3.12/dist-packages/schemathesis/generation/coverage.py:305
  /usr/local/lib/python3.12/dist-packages/schemathesis/generation/coverage.py:305: DeprecationWarning: jsonschema.exceptions.RefResolutionError is deprecated as of version 4.18.0. If you wish to catch potential reference resolution errors, directly catch referencing.exceptions.Unresolvable.
    ref_error: type[Exception] = jsonschema.RefResolutionError,

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=================================================================== short test summary info ====================================================================
FAILED test_moriio_connector.py::test_register_kv_caches - AssertionError: Current vLLM config is not set. This typically means get_current_vllm_config() was called outside of a set_current_vllm_config() context, o...
FAILED test_moriio_connector.py::test_moriio_handshake_returns_metadata - AssertionError: Current vLLM config is not set. This typically means get_current_vllm_config() was called outside of a set_current_vllm_config() context, o...
=========================================================== 2 failed, 3 passed, 3 warnings in 8.58s ============================================================```

@rasmith
Copy link
Contributor Author

rasmith commented Feb 18, 2026

Can you show the full output of the failing test? (including the failed assertion callstack) Also cc @tjtanaa @inkcherry

@orozery
All I am doing in this PR is adding
with set_current_vllm_config(vllm_config)
on lines 408 and 502.

The indentation makes it looks like I'm doing much more, especially since pre-commit had to reformat. It's really more like a two-line change.

@orozery
Copy link
Collaborator

orozery commented Feb 18, 2026

Thanks! got it now.

Can you reduce the change to nest just this line under the with statement?

connector = MoRIIOConnector(vllm_config, KVConnectorRole.WORKER)

Signed-off-by: Randall Smith <Randall.Smith@amd.com>
@rasmith
Copy link
Contributor Author

rasmith commented Feb 18, 2026

Thanks! got it now.

Can you reduce the change to nest just this line under the with statement?

connector = MoRIIOConnector(vllm_config, KVConnectorRole.WORKER)

Done, still works!

@orozery
Copy link
Collaborator

orozery commented Feb 18, 2026

You can still de-indent all other lines, so you would get ~4 lines changed.

@rasmith
Copy link
Contributor Author

rasmith commented Feb 18, 2026

You can still de-indent all other lines, so you would get ~4 lines changed.

I did, except I had to keep lines 439-441 under the with statement otherwise the test fails.

connector.connector_worker = FakeMorIIOConnectorWorker(
vllm_config, connector.engine_id, hand_shake_latency=0
)
with set_current_vllm_config(vllm_config):
Copy link
Contributor

@inkcherry inkcherry Feb 19, 2026

Choose a reason for hiding this comment

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

Thanks for the fix, LGTM.
Issue introduced by #30531 and #29575.
Noted related PR we can refer to : #31747, nixl also uses a similar approach
line: https://github.com/vllm-project/vllm/pull/31747/changes#diff-6ec47a6ca238ea4d626f7c5a87ab146a486dc61d5c4b024ef494622b5bf33636R312

Copy link
Collaborator

@orozery orozery left a comment

Choose a reason for hiding this comment

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

Thanks @rasmith !

@orozery orozery added the ready ONLY add when PR is ready to merge/full CI is needed label Feb 19, 2026
@vllm-bot vllm-bot merged commit 0c1dc42 into vllm-project:main Feb 20, 2026
14 of 17 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in AMD Feb 20, 2026
yugong333 pushed a commit to yugong333/vllm that referenced this pull request Feb 22, 2026
…or.py so tests pass (vllm-project#33739)

Signed-off-by: Randall Smith <Randall.Smith@amd.com>
jmamou pushed a commit to jmamou/vllm that referenced this pull request Feb 23, 2026
…or.py so tests pass (vllm-project#33739)

Signed-off-by: Randall Smith <Randall.Smith@amd.com>
llsj14 pushed a commit to llsj14/vllm that referenced this pull request Mar 1, 2026
…or.py so tests pass (vllm-project#33739)

Signed-off-by: Randall Smith <Randall.Smith@amd.com>
tunglinwood pushed a commit to tunglinwood/vllm that referenced this pull request Mar 4, 2026
…or.py so tests pass (vllm-project#33739)

Signed-off-by: Randall Smith <Randall.Smith@amd.com>
askliar pushed a commit to askliar/vllm that referenced this pull request Mar 9, 2026
…or.py so tests pass (vllm-project#33739)

Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Andrii Skliar <askliar@nvidia.com>
Copilot AI pushed a commit to machov/vllm that referenced this pull request Mar 10, 2026
…or.py so tests pass (vllm-project#33739)

Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working kv-connector ready ONLY add when PR is ready to merge/full CI is needed rocm Related to AMD ROCm v1

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants