Skip to content

Conversation

@ooooo-create
Copy link
Contributor

This PR fixes minor spelling errors in multiple files,
correcting terms like 'threashold', 'Triger', 'tokenzier', and 'tansfer'.

Motivation

💡 If this PR is a Cherry Pick, the PR title needs to follow the format by adding the [Cherry-Pick] label at the very beginning and appending the original PR ID at the end. For example, [Cherry-Pick][CI] Add check trigger and logic(#5191)

💡 如若此PR是Cherry Pick,PR标题需遵循格式,在最开始加上[Cherry-Pick]标签,以及最后面加上原PR ID,例如[Cherry-Pick][CI] Add check trigger and logic(#5191)

Modifications

Usage or Command

Accuracy Tests

Checklist

  • Add at least a tag in the PR title.
    • Tag list: [[FDConfig],[APIServer],[Engine], [Scheduler], [PD Disaggregation], [Executor], [Graph Optimization], [Speculative Decoding], [RL], [Models], [Quantization], [Loader], [OP], [KVCache], [DataProcessor], [BugFix], [Docs], [CI], [Optimization], [Feature], [Benchmark], [Others], [XPU], [HPU], [GCU], [DCU], [Iluvatar], [Metax]]
    • You can add new tags based on the PR content, but the semantics must be clear.
  • Format your code, run pre-commit before commit.
  • Add unit tests. Please write the reason in this PR if no unit tests.
  • Provide accuracy results.
  • If the current PR is submitting to the release branch, make sure the PR has been submitted to the develop branch, then cherry-pick it to the release branch with the [Cherry-Pick] PR tag.

Copilot AI review requested due to automatic review settings February 10, 2026 13:46
@paddle-bot
Copy link

paddle-bot bot commented Feb 10, 2026

Thanks for your contribution!

Copy link
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

该 PR 旨在统一并修正若干拼写错误(如 tokenziertokenizerthreasholdthresholdtansfertransferTrigerTrigger),以减少错误引用与不一致命名带来的维护成本;同时新增/引入了 fastdeploy/input/tokenizer_client.py 以提供异步 tokenizer 编解码客户端能力,并同步更新了 OpenAI serving 与测试用例的引用路径。

Changes:

  • fastdeploy.input.tokenzier_client 的引用统一修正为 fastdeploy.input.tokenizer_client(含 serving、demo、tests)。
  • 将健康检查相关关键字参数 time_interval_threashold 统一更正为 time_interval_threshold(含 engine/entrypoints/cache_manager 与 tests)。
  • 在 IPC 队列管理中将 tansfer_done_queue/get_tansfer_done_queue 更正为 transfer_done_queue/get_transfer_done_queue

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
tests/input/v1/test_tokenizer_client.py 修正 tokenizer client import 路径拼写
tests/input/test_tokenizer_client.py 修正 tokenizer client import 路径拼写
tests/entrypoints/test_engine_client.py 更新健康检查参数名为 time_interval_threshold
tests/engine/test_common_engine.py 更新健康检查参数名为 time_interval_threshold
tests/cache_manager/test_cache_transfer_manager.py 更新 cache manager 健康检查参数名为 time_interval_threshold
fastdeploy/worker/hpu_worker.py 修正注释中的拼写(但仍残留 grpah
fastdeploy/inter_communicator/engine_cache_queue.py 更正 transfer done 队列相关命名与 IPC register 名称
fastdeploy/input/tokenizer_client.py 新增异步 tokenizer 编解码客户端与请求模型定义
fastdeploy/entrypoints/openai/v1/serving_chat.py 修正 tokenizer client import 路径拼写
fastdeploy/entrypoints/openai/serving_completion.py 更新健康检查参数名为 time_interval_threshold
fastdeploy/entrypoints/openai/serving_chat.py 更新健康检查参数名为 time_interval_threshold
fastdeploy/entrypoints/openai/response_processors.py 修正 tokenizer client import 路径拼写
fastdeploy/entrypoints/engine_client.py 更正 check_health 参数名为 time_interval_threshold
fastdeploy/engine/engine.py 更正 check_health 参数名为 time_interval_threshold
fastdeploy/engine/common_engine.py 更正 check_health 参数名为 time_interval_threshold
fastdeploy/demo/tokenzier_client_demo.py 修正 tokenizer client import 路径拼写(文件名仍含 typo)
fastdeploy/cache_manager/cache_transfer_manager.py 更正 check_work_status 参数名为 time_interval_threshold

Comment on lines +2054 to 2058
def check_health(self, time_interval_threshold=30):
"""
Check the health of the model server by checking whether all workers are alive.
"""
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

check_health 参数名更改会导致外部关键字调用不兼容。建议增加对旧参数 time_interval_threashold 的兼容处理(同时逐步弃用),避免升级后运行时直接失败。

Suggested change
def check_health(self, time_interval_threshold=30):
"""
Check the health of the model server by checking whether all workers are alive.
"""
def check_health(self, time_interval_threshold=30, **kwargs):
"""
Check the health of the model server by checking whether all workers are alive.
"""
# Backward compatibility for deprecated argument name `time_interval_threashold`
if "time_interval_threashold" in kwargs:
if "time_interval_threshold" in kwargs:
raise TypeError(
"check_health() got multiple values for time interval threshold: "
"'time_interval_threshold' and deprecated 'time_interval_threashold'. "
"Please use 'time_interval_threshold' only."
)
console_logger.warning(
"Argument 'time_interval_threashold' is deprecated and will be removed in a future "
"release. Please use 'time_interval_threshold' instead."
)
time_interval_threshold = kwargs["time_interval_threashold"]

Copilot uses AI. Check for mistakes.
import asyncio

from fastdeploy.input.tokenzier_client import (
from fastdeploy.input.tokenizer_client import (
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

虽然已把 import 改为 tokenizer_client,但文件名仍为 tokenzier_client_demo.py(tokenizer 拼写错误),与模块名不一致且容易误导。建议重命名该 demo 文件(或增加兼容说明/重定向)以保持一致性。

Copilot generated this review using guidance from repository custom instructions.
import respx

from fastdeploy.input.tokenzier_client import (
from fastdeploy.input.tokenizer_client import (
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

PR 标题当前不符合仓库约定的“[CLASS]Title”格式(且包含引号)。建议在标题前添加合适的 tag(如 [Docs] / [BugFix] / [Others]),并去掉多余引号,以便通过仓库的 PR 规范检查。

Copilot uses AI. Check for mistakes.
Comment on lines +722 to 726
def check_health(self, time_interval_threshold=30):
"""
Check the health of the model server by checking whether all workers are alive.

"""
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

check_health 的参数名更改属于对外 API 破坏(关键字参数调用会直接报错)。建议保留对 time_interval_threashold 的兼容映射一段时间,并在日志/告警中提示迁移到 time_interval_threshold

Suggested change
def check_health(self, time_interval_threshold=30):
"""
Check the health of the model server by checking whether all workers are alive.
"""
def check_health(self, time_interval_threshold=30, **kwargs):
"""
Check the health of the model server by checking whether all workers are alive.
This method keeps backward compatibility for the deprecated keyword
argument ``time_interval_threashold``. Please migrate to using
``time_interval_threshold`` instead.
"""
# Backward compatibility for the misspelled keyword argument
if (
"time_interval_threashold" in kwargs
and time_interval_threshold == 30
):
console_logger.warning(
"Argument 'time_interval_threashold' is deprecated and will be "
"removed in a future release. Please use 'time_interval_threshold' instead."
)
time_interval_threshold = kwargs["time_interval_threashold"]

Copilot uses AI. Check for mistakes.
Comment on lines 129 to 130
)
QueueManager.register(
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

QueueManager.register 的暴露方法名从 get_tansfer_done_queue 改为 get_transfer_done_queue 属于 IPC 接口变更,可能导致已部署的 client/server 版本不一致时直接连接失败。建议在过渡期同时注册旧名字作为别名(指向同一队列)并逐步弃用。

Suggested change
)
QueueManager.register(
)
# Register legacy IPC name as alias for backward compatibility
QueueManager.register(
"get_tansfer_done_queue",
callable=lambda idx: self.transfer_done_queue_init[idx],
proxytype=ListProxy,
)
QueueManager.register(

Copilot uses AI. Check for mistakes.
raise ValueError("top_logprobs" if is_chat else "logprobs", err_msg)

def check_health(self, time_interval_threashold=30):
def check_health(self, time_interval_threshold=30):
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

check_health 的参数名从 time_interval_threashold 改为 time_interval_threshold 会破坏所有使用关键字参数的外部调用方。建议为旧参数名保留兼容(例如接受 **kwargs 并对旧名发出 deprecate warning),避免非必要的对外 API 破坏。

Copilot uses AI. Check for mistakes.
Comment on lines +1035 to 1039
def check_work_status(self, time_interval_threshold=envs.FD_CACHE_PROC_EXIT_TIMEOUT):
"""
Check the health of the model server by checking whether all workers are alive.

"""
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

check_work_status 参数名从 time_interval_threashold 改为 time_interval_threshold 同样会破坏外部关键字调用。建议在函数内部对旧参数名做兼容映射并提供弃用提示。

Suggested change
def check_work_status(self, time_interval_threshold=envs.FD_CACHE_PROC_EXIT_TIMEOUT):
"""
Check the health of the model server by checking whether all workers are alive.
"""
def check_work_status(self, time_interval_threshold=envs.FD_CACHE_PROC_EXIT_TIMEOUT, **kwargs):
"""
Check the health of the model server by checking whether all workers are alive.
This method keeps backward compatibility for the deprecated argument
name `time_interval_threashold`. Use `time_interval_threshold` instead.
"""
if "time_interval_threashold" in kwargs:
if "time_interval_threshold" in kwargs:
raise TypeError(
"check_work_status() got multiple values for argument "
"'time_interval_threshold' (both 'time_interval_threshold' "
"and deprecated 'time_interval_threashold' were provided)"
)
# Backward compatibility for deprecated argument name
time_interval_threshold = kwargs.pop("time_interval_threashold")
logger.warning(
"Argument 'time_interval_threashold' is deprecated and will be "
"removed in a future release. Please use 'time_interval_threshold' instead."
)
if kwargs:
# Do not silently ignore unknown arguments
unknown_keys = ", ".join(kwargs.keys())
raise TypeError(
f"check_work_status() got unexpected keyword argument(s): {unknown_keys}"
)

Copilot uses AI. Check for mistakes.
logger.info("Skipping warmup bucket, please set HPU_WARMUP_BUCKET=1 to enable it.")

# 2. Triger cuda grpah capture
# 2. Trigger cuda grpah capture
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

注释里仍有拼写错误:grpah 应为 graph

Suggested change
# 2. Trigger cuda grpah capture
# 2. Trigger cuda graph capture

Copilot uses AI. Check for mistakes.
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 70.58824% with 5 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop@19849a0). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...astdeploy/inter_communicator/engine_cache_queue.py 42.85% 4 Missing ⚠️
fastdeploy/engine/engine.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #6446   +/-   ##
==========================================
  Coverage           ?   67.71%           
==========================================
  Files              ?      391           
  Lines              ?    52747           
  Branches           ?     8214           
==========================================
  Hits               ?    35715           
  Misses             ?    14423           
  Partials           ?     2609           
Flag Coverage Δ
GPU 67.71% <70.58%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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