[None][fix] Revert "Add PyTorch reset_prefix_cache API (#14970)" - #15306
Conversation
This reverts commit ae9226e (PR NVIDIA#14970). PR NVIDIA#14970 added a reset_prefix_cache() method to BaseWorker in tensorrt_llm/executor/base_worker.py. Because RayGPUWorker inherits from BaseWorker, this method is now present on the worker class. The Ray worker extension injection path (RayGPUWorker._inject_worker_extension) rejects any extension whose attribute name already exists on the worker class, and RL / verl WorkerExtension also defines reset_prefix_cache. The collision raises: ValueError: Worker class RayGPUWorker already defines 'reset_prefix_cache', which conflicts with extension WorkerExtension. This kills RayGPUWorker during initialization, so the entire H100_PCIe-PyTorch-Ray-1 stage fails (all test_llm_update_weights*, test_llm_partial_update_weights*, and async_llm tests die before reaching their test logic). PR NVIDIA#14970 was merged with '/bot skip --comment "Known flaky tests"' even though the H100_PCIe-PyTorch-Ray-1 stage was already failing in its own final CI run (L0_MergeRequest_PR #42818, commit dd8936e), so the regression reached main. Reverting to unblock post-merge CI; the feature can be re-landed with a non-colliding name or an extension-aware injection check. Signed-off-by: xxi <xxi@nvidia.com>
|
/bot run |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (7)
💤 Files with no reviewable changes (7)
📝 WalkthroughWalkthroughThis PR removes the ChangesRemoval of reset_prefix_cache API
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
PR_Github #53865 [ run ] triggered by Bot. Commit: |
|
/bot skip -m "skip to unblock the CI, just revert PR" |
GitHub Bot Help
Provide a user friendly way for developers to interact with a Jenkins server. Run See details below for each supported subcommand. Details
Launch build/test pipelines. All previously running jobs will be killed.
kill
Kill all running builds associated with pull request. skip
Skip testing for latest commit on pull request. reuse-pipeline
Reuse a previous pipeline to validate current commit. This action will also kill all currently running builds associated with the pull request. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break. |
|
/bot skip --comment "skip to unblock the CI, just revert PR" |
|
PR_Github #53870 [ skip ] triggered by Bot. Commit: |
|
PR_Github #53865 [ run ] completed with state |
|
PR_Github #53870 [ skip ] completed with state |
Description
Reverts #14970 (
[None][feat] Add PyTorch reset_prefix_cache API, merge commitae9226e2852d39f93beb824bbd156a58d4445f31).Why
PR #14970 added a
reset_prefix_cache()method toBaseWorkerintensorrt_llm/executor/base_worker.py. SinceRayGPUWorker(RpcWorkerMixin, BaseWorker)inherits fromBaseWorker, the method is now present on the worker class.The Ray worker-extension injection path (
RayGPUWorker._inject_worker_extension,tensorrt_llm/executor/ray_gpu_worker.py:196-203) rejects any extension whose attribute name already exists on the worker class:RL / verl
WorkerExtensionalso definesreset_prefix_cache, so the names now collide and worker creation raises:This kills
RayGPUWorkerduring initialization, so the entireH100_PCIe-PyTorch-Ray-1stage fails — everytest_llm_update_weights*,test_llm_partial_update_weights*, andasync_llmtest dies before reaching its own logic (surfaced asRuntimeError: RayGPUWorker died during initialization).How it reached main
PR #14970 was merged with
/bot skip --comment "Known flaky tests"even though theH100_PCIe-PyTorch-Ray-1stage was already failing in its own final CI run (L0_MergeRequest_PR #42818, commitdd8936e). The failure was not flaky — it is this collision — so the regression landed onmainand broke post-merge CI (e.g.L0_Test-x86_64-Single-GPU #3385).Follow-up
The
reset_prefix_cachefeature can be re-landed by either choosing a non-colliding method name onBaseWorker, or making the extension-injection check tolerate an intentional override instead of hard-failing on any name match.Test Coverage
This is a pure revert (211 deletions across the 7 files originally touched by #14970, net diff is the exact inverse). Unblocks the
H100_PCIe-PyTorch-Ray-1Ray orchestrator update-weights tests that #14970 broke.PR Checklist
Summary by CodeRabbit
Breaking Changes
reset_prefix_cache()public API method from the LLM class and corresponding OpenAI server endpoint.New Features
/kv_cache_eventsendpoint to the OpenAI server for KV cache event management.