Skip to content

[FIX_FOR_VLLM_CUSTOM=a78b842d0e85d287176031334f4721cd96b6e47d] Fix offloading_connector test flush assertion for load transfers#1468

Merged
iboiko-habana merged 1 commit into
vllm-project:mainfrom
pawel-olejniczak:fix/offloading-connector-flush-assertion
May 21, 2026
Merged

[FIX_FOR_VLLM_CUSTOM=a78b842d0e85d287176031334f4721cd96b6e47d] Fix offloading_connector test flush assertion for load transfers#1468
iboiko-habana merged 1 commit into
vllm-project:mainfrom
pawel-olejniczak:fix/offloading-connector-flush-assertion

Conversation

@pawel-olejniczak
Copy link
Copy Markdown
Collaborator

Upstream vLLM PR vllm-project/vllm#42611 ("Flush all pending jobs on last step") changed `get_flushed_transfers()` to return both store and load flushes. The vllm-gaudi copy of the offloading_connector unit tests assumed only store flushes, causing:

  1. `AssertionError` in `utils.py` `_parse_transfers` (`isinstance(src_spec, GPULoadStoreSpec)` assert fails on load flushes)
  2. `flushed_gpu_block_indexes` mismatch in `test_scheduler` tests

Fix: Mirror the upstream change — replace the assert with an `if/else` handling both store and load flush types, and add `expected_flushed_gpu_block_indexes` to affected tests.

@github-actions
Copy link
Copy Markdown

🚧 CI Blocked

The main CI workflow was not started for the following reason:

Your branch is behind the base branch. Please merge or rebase to get the latest changes.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates KV offload test utilities and scheduler tests to correctly account for “flush” behavior in both store and load transfer paths, especially under async scheduling.

Changes:

  • Extend transfer parsing to record flushed GPU blocks for both store-flush and load-flush scenarios.
  • Adjust scheduler tests’ expected flushed GPU block indexes depending on sync vs async scheduling.
  • Add an assertion to ensure pending jobs are drained after request completion.

Reviewed changes

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

File Description
tests/unit_tests/kv_offload/offloading_connector/utils.py Updates _parse_transfers to handle load-flush transfers in addition to store-flush.
tests/unit_tests/kv_offload/offloading_connector/test_scheduler.py Updates expected flush behavior for async scheduling and adds a pending-jobs drain assertion.

Comment thread tests/unit_tests/kv_offload/offloading_connector/utils.py
Comment thread tests/unit_tests/kv_offload/offloading_connector/test_scheduler.py
@pawel-olejniczak pawel-olejniczak force-pushed the fix/offloading-connector-flush-assertion branch from 88f030e to 0d5d656 Compare May 20, 2026 08:36
@github-actions
Copy link
Copy Markdown

🚧 CI Blocked

The main CI workflow was not started for the following reason:

Your branch is behind the base branch. Please merge or rebase to get the latest changes.

@pawel-olejniczak pawel-olejniczak force-pushed the fix/offloading-connector-flush-assertion branch from 0d5d656 to e8f321d Compare May 20, 2026 08:36
@pawel-olejniczak pawel-olejniczak force-pushed the fix/offloading-connector-flush-assertion branch from e8f321d to 2850195 Compare May 20, 2026 15:57
Upstream PR #42611 changed get_flushed_transfers() to return both
store and load flushes. The vllm-gaudi test assumed only store flushes,
causing isInstance assertion failures. Mirror the upstream fix: handle
both flush types in _parse_transfers and update test expectations.

Signed-off-by: Paweł Olejniczak <pawelx.olejniczak@intel.com>
@pawel-olejniczak pawel-olejniczak force-pushed the fix/offloading-connector-flush-assertion branch from 2850195 to 98e5637 Compare May 20, 2026 22:55
@github-actions
Copy link
Copy Markdown

✅ CI Passed

All checks passed successfully against the following vllm commit:
a78b842d0e85d287176031334f4721cd96b6e47d

@iboiko-habana iboiko-habana merged commit bb9ca73 into vllm-project:main May 21, 2026
2 checks passed
12010486 pushed a commit to 12010486/vllm-gaudi that referenced this pull request May 21, 2026
…floading_connector test flush assertion for load transfers (vllm-project#1468)

Upstream vLLM PR vllm-project/vllm#42611 ("Flush all pending jobs on
last step") changed \`get_flushed_transfers()\` to return both store and
load flushes. The vllm-gaudi copy of the offloading_connector unit tests
assumed only store flushes, causing:

1. \`AssertionError\` in \`utils.py\` \`_parse_transfers\`
(\`isinstance(src_spec, GPULoadStoreSpec)\` assert fails on load
flushes)
2. \`flushed_gpu_block_indexes\` mismatch in \`test_scheduler\` tests

**Fix**: Mirror the upstream change — replace the assert with an
\`if/else\` handling both store and load flush types, and add
\`expected_flushed_gpu_block_indexes\` to affected tests.

Signed-off-by: Paweł Olejniczak <pawelx.olejniczak@intel.com>
Signed-off-by: 12010486 <silvia.colabrese@intel.com>
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.

3 participants