Skip to content

[Bugfix][EC Connector] Don't create hash directories on cache-miss lookups in ECExampleConnector - #60826

Merged
Isotr0py merged 4 commits into
vllm-project:mainfrom
zhouyou9505:fix-ec-lookup-mkdir
Oct 13, 2026
Merged

Isotr0py merged 4 commits into
vllm-project:mainfrom
zhouyou9505:fix-ec-lookup-mkdir

Conversation

@zhouyou9505

@zhouyou9505 zhouyou9505 commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

ECExampleConnector.has_cache_item() resolves the safetensors path via
_generate_filename_debug(), which auto-creates the <mm_hash>/ directory.
Since has_cache_item() is called from the scheduler's encoder-input
admission check and from update_state_after_alloc() on every multimodal
allocation, every probed-but-missed hash leaves an empty directory in
shared storage
. On a long-lived deployment the EC storage root accumulates
one empty directory per unique missed hash, making the cache impossible to
inspect and polluting any listing-based tooling/backup jobs.

Fixes #60820

Approach

Keep auto-creation on the save path (where the directory is actually
needed) and disable it on the lookup path:

  • _found_match_for_mm_data() now passes create_folder=False to
    _generate_filename_debug().
  • _generate_filename_debug() gains a create_folder: bool = True
    parameter, forwarded to _generate_foldername_debug(). Defaults are
    unchanged, so save_caches() / start_load_caches() behavior is
    identical.

No behavioral change beyond the filesystem side effect.

Testing

  • Added test_has_cache_item_miss_creates_no_folder to the existing
    tests/v1/ec_connector/unit/test_ec_example_connector.py: a cache-miss
    lookup leaves no empty folder in shared storage.
  • Also verified on a live A100 EPD testbed against a producer-role
    connector: VERIFY-OK.

Notes

  • Observed on a live deployment; the same code paths exist on current main.
  • start_load_caches is untouched: it only loads hashes that
    has_cache_item() has already confirmed to exist.

…okups

has_cache_item() resolves the safetensors path via
_generate_filename_debug(), which auto-creates the <mm_hash>/
directory. Every probed-but-missed hash therefore leaves an empty
directory in shared storage, accumulating one dir per unique missed
hash over the deployment lifetime and polluting cache inspection
and any listing-based tooling.

Keep auto-creation on the save path (where the directory is actually
needed) and disable it on the lookup path.

Closes vllm-project#60820

Signed-off-by: zhouyou9505 <zhouyou9505@gmail.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@mergify mergify Bot added the bug Something isn't working label Oct 9, 2026

@vadiklyutiy vadiklyutiy left a comment

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.

Thank you for PR

  1. Shorter comments please
  2. Too many tests, don't worth new file. Pls consider to just pick up test from here https://github.com/vadiklyutiy/vllm/tree/lyutiydoctor/20261010-040715-vllm-60820

Keep the original one-line docstrings, pass create_folder
positionally, and replace the new test file with a single test
added to the existing test_ec_example_connector.py.

Signed-off-by: zhouyou9505 <zhouyou9505@gmail.com>
@zhouyou9505

zhouyou9505 commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor Author

@vadiklyutiy Thanks for the review! kept the original one-line docstrings, and replaced the new test file with the single test picked up from your branch.

@gty111 gty111 self-assigned this Oct 11, 2026

@gty111 gty111 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. Thanks for the fix.

@gty111 gty111 added the ready ONLY add when PR is ready to merge/full CI is needed label Oct 11, 2026
@github-actions

Copy link
Copy Markdown

✅ @zhouyou9505, CI is now available for this PR.

  • /ci run starts upstream CI; /amd-ci run starts AMD CI only.
  • Your branch must contain every commit currently on its upstream target branch. Merge or rebase onto the latest target branch, then rerun the command. Append --allow-stale to a run command to test an outdated branch at your own risk.
  • /ci retry retries failed jobs in the CI build for the current PR head. If the current head has no CI build, it starts a new CI build for the current head containing only jobs that failed in the latest earlier CI build for this PR.
  • /amd-ci retry retries failed jobs in AMD CI for the current PR head. Use /amd-ci run when the current head has no AMD CI build.
  • /ci cancel cancels scheduled or running CI builds for this PR branch; /amd-ci cancel does the same for AMD CI only.

@gty111

gty111 commented Oct 11, 2026

Copy link
Copy Markdown
Collaborator

@zhouyou9505 Could you merge main and kick off CI?

Signed-off-by: zhouyou9505 <zhouyou9505@gmail.com>
@zhouyou9505

Copy link
Copy Markdown
Contributor Author

@gty111 thx. I've finished it.

@gty111

gty111 commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

/ci run --allow-stale

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #94104 for commit f3eefc045e1b.

@zhouyou9505

Copy link
Copy Markdown
Contributor Author

@gty111 It seems the run failed, but it's might not the PR's fault.

@gty111

gty111 commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

/ci retry

@github-actions

Copy link
Copy Markdown

✅ Queued 1 failed job(s) for retry in Buildkite CI #94104.

@vllm-agent

vllm-agent commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

CI selector (shadow): 3 test steps (6 jobs) instead of 63 (79 jobs)

Shadow mode: this changes nothing about what CI runs. It shows what the evidence-based selector would pick for this PR, next to today's rules. How it works.

Feedback welcome: reply here if it would skip a step this change needs, or runs something unrelated.

steps (jobs) Today's rules Selector Would skip Would add
NVIDIA, CPU and others 63 (79) 3 (6) 60 (73) 0 (0)
AMD mirrors 68 (79) 2 (5) 66 (74) 0 (0)
Selector would run (3)
  • scale-out-ec-e2e-2-gpus
  • v1-kv-connectors ×4
  • v1-others-cpu
Would skip (today's rules run them) (60)
  • ascend-npu-test
  • async-engine-inputs-utils-worker
  • basic-correctness ×2
  • basic-correctness-cpu-offload
  • basic-correctness-cumem
  • basic-correctness-prefetch-offload
  • basic-correctness-sleep-mode
  • basic-models-test-other-cpu
  • basic-models-tests-initialization
  • basic-models-tests-other
  • benchmarks-cli-test
  • cpu-language-generation-and-pooling-model-tests ×3
  • distributed-comm-ops
  • distributed-compile-comm-4-gpus
  • distributed-compile-rpc-tests-2-gpus
  • distributed-dp-tests-2-gpus
  • distributed-dp-tests-4-gpus
  • distributed-torchrun-examples-4-gpus
  • distributed-torchrun-shutdown-tests-2-gpus
  • elastic-ep-scaling-test
  • entrypoints-integration-api-server ×4
  • entrypoints-integration-api-server-generate
  • entrypoints-integration-api-server-openai-chat_completion
  • entrypoints-integration-api-server-openai-completion
  • entrypoints-integration-llm
  • entrypoints-integration-multimodal
  • entrypoints-integration-pooling
  • entrypoints-integration-responses-api
  • entrypoints-integration-speech_to_text
  • kernels-fla-ops-test-b200
  • kernels-mhc-test-b200
  • kernels-root-misc-test-b200
  • language-models-tests-granite-l4-compatibility
  • language-models-tests-hybrid ×2
  • language-models-tests-standard
  • metrics-tracing-2-gpus
  • mooncake-ec-tcp-e2e-2-gpus
  • multi-modal-models-standard-1-qwen2
  • multi-modal-models-standard-2-qwen3-gemma
  • multi-modal-models-standard-3-llava-qwen2-vl
  • multi-modal-models-standard-4-other-whisper
  • multi-modal-processor ×4
  • multi-modal-processor-cpu ×4
  • pipeline-context-parallelism-4-gpus
  • pytorch-compilation-dynamic-shapes
  • pytorch-compilation-passes-unit-tests
  • pytorch-compilation-unit-tests
  • pytorch-compilation-unit-tests-h100
  • pytorch-fullgraph-cudagraph-l4-compatibility
  • pytorch-fullgraph-test
  • regression
  • rl-entrypoints-tests
  • rust-frontend-distributed
  • v1-core
  • v1-executor-worker
  • v1-kv-offload
  • v1-logits-oracle
  • v1-metrics-lmeval
  • v1-sample
  • v1-spec-decode
Would add (today's rules do not run them) (0)

none

AMD mirrors: would skip (66)
  • async-engine-inputs-utils-worker
  • basic-correctness ×2
  • basic-correctness-cpu-offload
  • basic-correctness-cumem
  • basic-correctness-prefetch-offload
  • basic-correctness-sleep-mode
  • basic-models-tests-initialization
  • basic-models-tests-other
  • benchmarks-cli-test
  • distributed-comm-ops
  • distributed-compile-comm-4-gpus
  • distributed-compile-rpc-tests-2-gpus
  • distributed-dp-tests-2-gpus
  • distributed-dp-tests-4-gpus
  • distributed-tests-8xh100
  • distributed-torchrun-examples-4-gpus
  • distributed-torchrun-shutdown-tests-2-gpus
  • entrypoints-integration-api-server ×4
  • entrypoints-integration-api-server-generate
  • entrypoints-integration-api-server-openai-chat_completion
  • entrypoints-integration-api-server-openai-completion
  • entrypoints-integration-llm
  • entrypoints-integration-multimodal
  • entrypoints-integration-pooling
  • entrypoints-integration-responses-api
  • entrypoints-integration-speech_to_text
  • fault-tolerance-e2e-2xh100
  • fusion-and-compile-unit-tests-2xb200
  • fusion-e2e-tp2-ar-rms-config-sweep-h100
  • fusion-e2e-tp2-b200
  • fusion-e2e-tp2-quick-h100
  • gemm-rs-ar-2xb200
  • kernels-fla-ops-test-b200
  • kernels-fusedmoe-layer-test-2-b200s
  • kernels-fusedmoe-layer-test-2-h100s
  • kernels-mhc-test-b200
  • kernels-minimax-reduce-rms-test-2-gpus
  • kernels-root-misc-test-b200
  • language-models-tests-granite-l4-compatibility
  • language-models-tests-hybrid ×2
  • language-models-tests-standard
  • metrics-tracing-2-gpus
  • mooncake-ec-tcp-e2e-2-gpus
  • multi-modal-models-standard-1-qwen2
  • multi-modal-models-standard-2-qwen3-gemma
  • multi-modal-models-standard-3-llava-qwen2-vl
  • multi-modal-models-standard-4-other-whisper
  • multi-modal-processor ×4
  • pipeline-context-parallelism-4-gpus
  • platform-tests
  • pytorch-compilation-dynamic-shapes
  • pytorch-compilation-passes-unit-tests
  • pytorch-compilation-unit-tests
  • pytorch-compilation-unit-tests-h100
  • pytorch-fullgraph-cudagraph-l4-compatibility
  • pytorch-fullgraph-test
  • regression
  • rl-entrypoints-tests
  • rust-frontend-distributed
  • v1-core
  • v1-executor-worker
  • v1-kv-offload
  • v1-logits-oracle
  • v1-metrics-lmeval
  • v1-sample
  • v1-spec-decode
AMD mirrors: would add (0)

none

2 changed files · base f47792af7f · head 858b4f4af8 · Python record: build 93039 at 1e5d0ea888 · kernel record: table fe341a5 (build 94315), map fe341a5 · not counted: 11 build steps, 5 A100 steps the generator no longer emits, 7 optional steps the selector would also run

@gty111

gty111 commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

@gty111 It seems the run failed, but it's might not the PR's fault.

Could you merge main to include CI fix commit?

@gty111

gty111 commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

/ci retry

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #94352 for commit 858b4f4af8f6, running 1 failed step(s) from Buildkite CI #94104.

@Isotr0py
Isotr0py merged commit 3ad096f into vllm-project:main Oct 13, 2026
16 checks passed
AndreasKaratzas pushed a commit to AndreasKaratzas/vllm that referenced this pull request Oct 16, 2026
…okups in ECExampleConnector (vllm-project#60826)

Signed-off-by: zhouyou9505 <zhouyou9505@gmail.com>

Signed-off-by: Andreas Karatzas <AndreasKaratzas@users.noreply.github.com>
michael-gpu pushed a commit to practical-inference/vllm-ampere-extended that referenced this pull request Oct 20, 2026
…okups in ECExampleConnector (vllm-project#60826)

Signed-off-by: zhouyou9505 <zhouyou9505@gmail.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 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.

[Bug]: ECExampleConnector.has_cache_item() creates empty hash directories in shared storage on cache-miss lookups

5 participants