[BugFix] Fix tokenizer_client file name#7590
[BugFix] Fix tokenizer_client file name#7590xiaoxiaohehe001 wants to merge 1 commit intoPaddlePaddle:release/2.6from
Conversation
|
Thanks for your contribution! |
There was a problem hiding this comment.
Pull request overview
该 PR 旨在修复 tokenizer_client 模块命名/引用错误:新增(或更正)fastdeploy.input.tokenizer_client 并将原先拼写错误的 tokenzier_client 引用点统一改为正确路径,以恢复相关功能与测试可运行性。
Changes:
- 将多个文件中的错误导入
fastdeploy.input.tokenzier_client更正为fastdeploy.input.tokenizer_client - 新增
fastdeploy/input/tokenizer_client.py,提供AsyncTokenizerClient及相关请求模型 - 更新/对齐相应测试用例的导入路径
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/input/test_tokenizer_client.py | 修正测试导入路径到 tokenizer_client,确保测试能找到模块 |
| fastdeploy/input/tokenizer_client.py | 新增/更正 tokenizer client 实现与请求模型定义 |
| fastdeploy/entrypoints/openai/v1/serving_chat.py | 修正 OpenAI serving 侧导入路径 |
| fastdeploy/entrypoints/openai/response_processors.py | 修正 response processor 导入路径 |
| fastdeploy/demo/tokenzier_client_demo.py | 修正 demo 内导入路径到 tokenizer_client |
| import asyncio | ||
|
|
||
| from fastdeploy.input.tokenzier_client import ( | ||
| from fastdeploy.input.tokenizer_client import ( |
There was a problem hiding this comment.
该 demo 文件名仍为 tokenzier_client_demo.py(拼写错误),但内部已改为导入 tokenizer_client。为避免后续用户/脚本按文件名搜索或引用时混淆,建议同时把 demo 文件名也更正为 tokenizer_client_demo.py(并相应更新任何引用/文档链接)。
| import respx | ||
|
|
||
| from fastdeploy.input.tokenzier_client import ( | ||
| from fastdeploy.input.tokenizer_client import ( |
There was a problem hiding this comment.
PR 描述里的 Modifications / Usage or Command / Accuracy Tests 等章节目前仍为空,同时 Checklist 也未勾选/说明。建议补充:具体改动点(例如重命名/新增 tokenizer_client.py 并更新引用)、如何验证(运行哪些单测/命令),以及如果不需要额外测试的原因,方便 reviewer/CI 追踪。
PaddlePaddle-bot
left a comment
There was a problem hiding this comment.
🤖 AI Code Review |
2026-04-23 19:15:24
📋 Review 摘要
PR 概述:修复 tokenzier_client(拼写错误,少字母 i)→ tokenizer_client 的模块 import 路径,并重命名对应源文件
变更范围:fastdeploy/input/、fastdeploy/entrypoints/openai/、fastdeploy/demo/、tests/input/
影响面 Tag:[BugFix] [APIServer] [DataProcessor]
📝 PR 规范检查
① Cherry-Pick 标签缺失:PR 目标分支为 release/2.6(非 develop),按规范标题需在前加 [Cherry-Pick] 并附原 PR 编号。
标题建议(可直接复制):
[Cherry-Pick][BugFix] Fix tokenizer_client file name (#XXXX)
请将
#XXXX替换为该修复在develop分支合并时的 PR 编号。
② Modifications 章节未填写:PR 描述中 Modifications 为空,建议补充。
描述建议(可直接复制):
## Modifications
- 将 4 处拼写错误的模块路径 `tokenzier_client`(少字母 `i`)统一修正为 `tokenizer_client`
- 重命名源文件 `fastdeploy/input/tokenzier_client.py` → `tokenizer_client.py`
- 同步修正 `demo/`、`entrypoints/openai/`、`tests/input/` 下的 import 语句
问题
| 级别 | 文件 | 概述 |
|---|---|---|
| 🟡 建议 | fastdeploy/demo/tokenzier_client_demo.py:19 |
文件名本身仍含拼写错误 tokenzier,本次 PR 仅修复了内部 import,未重命名文件 |
总体评价
改动清晰,属于低风险拼写错误修复,逻辑无误。建议同步重命名 demo 文件本身(tokenzier_client_demo.py → tokenizer_client_demo.py),并按规范补充 Cherry-Pick 标签和 Modifications 描述后合入。
| import asyncio | ||
|
|
||
| from fastdeploy.input.tokenzier_client import ( | ||
| from fastdeploy.input.tokenizer_client import ( |
There was a problem hiding this comment.
🟡 建议 文件名本身仍含拼写错误
当前文件名为 tokenzier_client_demo.py(tokenzier 少了字母 i),本次 PR 仅修复了文件内的 import 路径,但未重命名文件本身。
建议同步将文件重命名为:
tokenizer_client_demo.py
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/2.6 #7590 +/- ##
==============================================
Coverage ? 73.47%
==============================================
Files ? 376
Lines ? 53275
Branches ? 8330
==============================================
Hits ? 39146
Misses ? 11370
Partials ? 2759
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Motivation
Fix tokenizer_client file name
Modifications
Usage or Command
Accuracy Tests
Checklist
[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]]pre-commitbefore commit.releasebranch, make sure the PR has been submitted to thedevelopbranch, then cherry-pick it to thereleasebranch with the[Cherry-Pick]PR tag.