fix(deepseek): follow pypto-lib kernel dir rename v4 -> v4-flash - #108
fix(deepseek): follow pypto-lib kernel dir rename v4 -> v4-flash#108lwDavid wants to merge 2 commits into
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughDeepSeek V4 kernel directory discovery and module detection now use ChangesDeepSeek V4 Flash Kernel Path
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pypto_serving/model/deepseek/npu_executor.py`:
- Around line 131-139: Update the kernel-directory lookup around the candidate
path in the executor initialization flow to remain compatible with checkouts
containing the existing models/deepseek/v4 location, or ensure this change is
gated and released atomically with the pypto-lib rename and pin update. Preserve
v4-flash resolution for updated checkouts while preventing premature
FileNotFoundError failures for older compatible layouts.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 7f7b01db-1146-477d-bd9e-9d00ffe5e7ee
📒 Files selected for processing (1)
pypto_serving/model/deepseek/npu_executor.py
pypto-lib renamed models/deepseek/v4 -> v4-flash (splitting the variant into v4-flash + v4-pro). Point the DeepSeekV4 kernel discovery and the module-file guard at models/deepseek/v4-flash. Also accept the old models/deepseek/v4 path as a transition fallback. The pypto-lib submodule pinned in this repo still carries v4 until it is bumped, and serving's unit-tests job starts the accuracy test (real discovery, not monkeypatched) against that submodule -- so hardcoding only v4-flash breaks it. v4-flash is preferred when both exist. Function names keep the "deepseek_v4" model-family identifier. Follow-up (after the pypto-lib rename merges): bump the pypto-lib submodule pin to a commit carrying models/deepseek/v4-flash, then drop the v4 fallback.
c10942d to
6ffdb33
Compare
The pinned pypto-lib (306519dc) was stale. Bump to lib main 72ee6a1, which includes the v4 -> v4-flash + v4-pro split (#816), so serving's DeepSeek accuracy guard runs against current kernels (kernel discovery now resolves models/deepseek/v4-flash).
Summary
Follows the pypto-lib kernel-directory rename
models/deepseek/v4→models/deepseek/v4-flash(pypto-lib splits the variant intov4-flash+v4-pro;v4-flashis the serving/W8A8 variant). Without this, serving's DeepSeekV4 startup fails withFileNotFoundError: Cannot locate DeepSeekV4 kernels.Changes
pypto_serving/model/deepseek/npu_executor.py(3 lines, path component only):_find_pypto_lib_deepseek_v4_dir— both candidate paths (PYPTO_ROOT/models/deepseek/v4and<checkout>/pypto-lib/models/deepseek/v4) →.../v4-flash._is_deepseek_v4_module_file— the("models", "deepseek", "v4")parts check →("models", "deepseek", "v4-flash").Function names keep the
deepseek_v4model-family identifier — only the filesystem path component moves, matching how the qwen discovery (models/qwen3/14b) is hardcoded.Why it's safe
The unit tests monkeypatch
_find_pypto_lib_deepseek_v4_dir(tests/test_deepseek_v4.py), so they never exercise the real path and need no changes. The real discovery only runs at device-serving startup.Coordination / follow-up
pypto-libsubmodule pin to a commit that carriesmodels/deepseek/v4-flash, so a checked-out serving tree is self-consistent. Not needed for serving's unit CI (discovery is monkeypatched there).