Skip to content

Commit 4b43eb7

Browse files
kevincheng2claude
andcommitted
[BugFix][KVCache] remove debug logging code
## Modifications - fastdeploy/engine/request.py:删除调试用 logger 及 prompt_hashes 中的 debug 日志 - fastdeploy/worker/worker_process.py:删除 __main__ 中的调试 import 和 print 语句 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 1b81cc4 commit 4b43eb7

2 files changed

Lines changed: 0 additions & 15 deletions

File tree

fastdeploy/engine/request.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from __future__ import annotations
1818

1919
import json
20-
import logging
2120
import time
2221
import traceback
2322
from dataclasses import asdict, dataclass, fields
@@ -29,8 +28,6 @@
2928
if TYPE_CHECKING:
3029
from fastdeploy.cache_manager.v1.metadata import MatchResult
3130

32-
logger = logging.getLogger("request_debug")
33-
3431
import numpy as np
3532
from fastapi.responses import JSONResponse
3633
from pydantic import BaseModel
@@ -244,12 +241,6 @@ def prompt_hashes(self) -> list[str]:
244241
When accessing this property, it checks if there are new complete blocks
245242
that need hash computation, and if so, computes and appends them.
246243
"""
247-
logger.debug(
248-
f"[DEBUG prompt_hashes] request_id={self.request_id}, "
249-
f"has_block_hasher={self._block_hasher is not None}, "
250-
f"existing_hashes_len={len(self._prompt_hashes)}, "
251-
f"prompt_token_ids_len={len(self.prompt_token_ids) if self.prompt_token_ids else 0}"
252-
)
253244
if self._block_hasher is not None:
254245
new_hashes = self._block_hasher(self)
255246
if new_hashes:

fastdeploy/worker/worker_process.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,10 +1357,4 @@ def run_worker_proc() -> None:
13571357

13581358

13591359
if __name__ == "__main__":
1360-
import sys
1361-
1362-
from fastdeploy.cache_manager.ops import cuda_host_alloc
1363-
1364-
print(f"[DEBUG] Worker process sys.path[0] = {sys.path[0]}", flush=True)
1365-
print(f"[DEBUG] Worker process cuda_host_alloc = {cuda_host_alloc}", flush=True)
13661360
run_worker_proc()

0 commit comments

Comments
 (0)