Skip to content

[Bug][Failing Test] v1-test - v1/kv_connector/unit/test_nixl_connector.py::test_prompt_less_than_block_size #18419

@markmc

Description

@markmc

Your current environment

Still failing on main as of commit bca55b5

🐛 Describe the bug

Failing tests:

v1/kv_connector/unit/test_nixl_connector.py::test_prompt_less_than_block_size - AssertionError: assert 1 == 0
Logs
INFO 05-19 23:01:39 [nixl_connector.py:175] Initializing NIXL Scheduler 2c860054-b9fd-4a5e-bb1e-9c06ab435902
DEBUG 05-19 23:01:39 [nixl_connector.py:201] NIXLConnector get_num_new_matched_tokens: num_computed_tokens=0, kv_transfer_params={'do_remote_prefill': True, 'do_remote_decode': False, 'remote_engine_id': 'my-engine-id', 'remote_block_ids': [0, 1, 2], 'remote_host': 'my-host', 'remote_port': 1234}
DEBUG 05-19 23:01:39 [nixl_connector.py:232] NIXLConnector update_state_after_alloc: num_external_tokens=32, kv_transfer_params={'do_remote_prefill': True, 'do_remote_decode': False, 'remote_engine_id': 'my-engine-id', 'remote_block_ids': [0, 1, 2], 'remote_host': 'my-host', 'remote_port': 1234}
DEBUG 05-19 23:01:39 [scheduler.py:1002] Finished recving KV transfer for request id-1
DEBUG 05-19 23:01:39 [nixl_connector.py:284] NIXLConnector request_finished, request_status=6, kv_transfer_params={'do_remote_prefill': False, 'do_remote_decode': False, 'remote_engine_id': 'my-engine-id', 'remote_block_ids': [0, 1, 2], 'remote_host': 'my-host', 'remote_port': 1234}
PASSED

=================================== FAILURES ===================================
_______________________ test_prompt_less_than_block_size _______________________

    def test_prompt_less_than_block_size():
        """
        Test that we can handle case where prompt is < block.
    
        In this case, the P worker will send empty remote_block_ids.
        The D worker should not schedule an async read in this case,
        since there is nothing to pull.
        """
        vllm_config = create_vllm_config()
        scheduler = create_scheduler(vllm_config)
    
        # Half of a block.
        BLOCK_SIZE = vllm_config.cache_config.block_size
        NUM_TOKENS = int(BLOCK_SIZE * 0.5)
    
        # Request will have 0 remote blocks.
        request = create_request(request_id=1,
                                 num_tokens=NUM_TOKENS,
                                 do_remote_prefill=True,
                                 num_remote_blocks=0)
        scheduler.add_request(request)
        scheduler_output = scheduler.schedule()
    
        # This request should not have to read async.
        kv_connector_metadata = scheduler_output.kv_connector_metadata
        assert kv_connector_metadata is not None
        assert isinstance(kv_connector_metadata, NixlConnectorMetadata)
>       assert len(kv_connector_metadata.requests) == 0
E       AssertionError: assert 1 == 0
E        +  where 1 = len({'id-1': ReqMeta(local_block_ids=[], remote_block_ids=[], remote_host='my-host', remote_port=1234, remote_engine_id='my-engine-id')})
E        +    where {'id-1': ReqMeta(local_block_ids=[], remote_block_ids=[], remote_host='my-host', remote_port=1234, remote_engine_id='my-engine-id')} = <vllm.distributed.kv_transfer.kv_connector.v1.nixl_connector.NixlConnectorMetadata object at 0x7f810ef30230>.requests

v1/kv_connector/unit/test_nixl_connector.py:70: AssertionError
=============================== warnings summary ===============================
../../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,

v1/kv_connector/unit/test_multi_connector.py:26
  /vllm-workspace/tests/v1/kv_connector/unit/test_multi_connector.py:26: PytestCollectionWarning: cannot collect test class 'TestSharedStorageConnector' because it has a __init__ constructor (from: tests/v1/kv_connector/unit/test_multi_connector.py)
    class TestSharedStorageConnector(SharedStorageConnector):

tests/v1/kv_connector/unit/test_multi_connector.py::test_multi_shared_storage_connector_consistency
  /usr/lib/python3.12/multiprocessing/popen_fork.py:66: DeprecationWarning: This process (pid=6996) is multi-threaded, use of fork() may lead to deadlocks in the child.
    self.pid = os.fork()

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED v1/kv_connector/unit/test_nixl_connector.py::test_prompt_less_than_block_size - AssertionError: assert 1 == 0
 +  where 1 = len({'id-1': ReqMeta(local_block_ids=[], remote_block_ids=[], remote_host='my-host', remote_port=1234, remote_engine_id='my-engine-id')})
 +    where {'id-1': ReqMeta(local_block_ids=[], remote_block_ids=[], remote_host='my-host', remote_port=1234, remote_engine_id='my-engine-id')} = <vllm.distributed.kv_transfer.kv_connector.v1.nixl_connector.NixlConnectorMetadata object at 0x7f810ef30230>.requests
=================== 1 failed, 9 passed, 3 warnings in 53.55s ===================
^^^ +++
🚨 Error: The command exited with status 1
^^^ +++
user command error: The plugin docker command hook exited with status 1
~~~ Running global pre-exit hook
$ /etc/buildkite-agent/hooks/pre-exit
~~~ Running plugin docker pre-exit hook
$ /var/lib/buildkite-agent/plugins/bk-gpu-1-queue-ci-i-003bad80c004d9fe7-1/github-com-buildkite-plugins-docker-buildkite-plugin-v5-2-0/hooks/pre-exit

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingci-failureIssue about an unexpected test failure in CI

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions