[Speculative Decoding] Remove arctic_inference deps#7231
[Speculative Decoding] Remove arctic_inference deps#7231Jiang-Jia-Jun merged 1 commit intoPaddlePaddle:developfrom
Conversation
|
Thanks for your contribution! |
fastdeploy-bot
left a comment
There was a problem hiding this comment.
🤖 AI Code Review | 2026-04-08
📋 Review 摘要
PR 概述:将 arctic_inference 从硬依赖改为可选依赖,仅在 Suffix Decoding 功能使用时按需安装
变更范围:fastdeploy/spec_decode/suffix.py、requirements.txt
影响面 Tag:[Speculative Decoding]
📝 PR 规范检查
- 标题:符合规范,包含
[Speculative Decoding]标签 - 描述:
## Motivation和## Modifications段落为空,建议填写
描述模板(可直接复制):
## Motivation
将 `arctic_inference` 从硬依赖改为可选依赖,减少不必要的依赖安装。只有使用 Suffix Decoding 功能时才需要安装此包。
## Modifications
- 从 requirements.txt 中移除 arctic_inference 硬依赖
- 更新 SuffixProposer 的错误提示,明确安装命令和版本号问题
| 级别 | 文件 | 概述 |
|---|---|---|
| 🟡 建议 | fastdeploy/spec_decode/suffix.py:46 |
版本号不一致:错误信息指定 0.1.2,但原依赖是 0.1.3 |
📄 文档建议(本次 PR 未包含)
虽然本次 PR 未修改文档文件,但建议后续更新文档说明 Suffix Decoding 的依赖安装:
docs/features/speculative_decoding.md: 在 "🌲 Using Suffix Decoding" 章节添加依赖说明docs/zh/features/speculative_decoding.md: 在 "🌲 使用后缀解码" 章节添加依赖说明
建议添加内容:
> Note: Suffix Decoding requires the `arctic-inference` package. Install it with:
> ```bash
> pip install arctic-inference==<正确版本号>
> ```总体评价
将 arctic_inference 从硬依赖改为可选依赖的方案合理,使用 try-except 导入模式优雅处理缺失依赖的情况。但存在版本号不一致的问题,建议确认正确的版本号并统一更新错误提示信息。
| if SuffixDecodingCache is None: | ||
| raise ImportError( | ||
| "arctic_inference.suffix_decoding is not available. Please install arctic-inference package." | ||
| "arctic_inference.suffix_decoding is not available. Please install via `pip install arctic-inference==0.1.2`." |
There was a problem hiding this comment.
🟡 建议 版本号不一致:错误信息中指定的是 arctic-inference==0.1.2,但原 requirements.txt 使用的是 arctic_inference-0.1.3 版本。请确认正确的版本号并保持一致。
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #7231 +/- ##
==========================================
Coverage ? 73.59%
==========================================
Files ? 383
Lines ? 53493
Branches ? 8375
==========================================
Hits ? 39367
Misses ? 11381
Partials ? 2745
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
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.