Skip to content

Refactor: follow pypto-lib's flattened model directories - #136

Merged
superxf merged 1 commit into
hw-native-sys:mainfrom
zhangqi-chen:refactor/pypto-lib-flat-model-dirs
Aug 5, 2026
Merged

Refactor: follow pypto-lib's flattened model directories#136
superxf merged 1 commit into
hw-native-sys:mainfrom
zhangqi-chen:refactor/pypto-lib-flat-model-dirs

Conversation

@zhangqi-chen

@zhangqi-chen zhangqi-chen commented Aug 4, 2026

Copy link
Copy Markdown

pypto-lib replaced models/// with one flat directory per
model build, so the hardcoded kernel paths here no longer resolve.

  • Bump the pypto-lib submodule to the revision that carries the rename.
  • Qwen3-14B resolves models/qwen3_14b instead of models/qwen3/14b, in both
    the PYPTO_ROOT branch and the checkout walk.
  • DeepSeekV4 resolves models/deepseek_v4_flash_mtp instead of
    models/deepseek/v4-flash. Two places assumed the extra family level:
    _is_deepseek_v4_module_file compared three trailing path segments, and
    _load_kernel_modules derived the pypto-lib root it puts on sys.path as
    _kernel_dir.parents[2]. Both now count one level less.
  • Retarget the kernel-directory constants in the tests.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

DeepSeekV4 and Qwen3-14B kernel discovery now targets flattened model directories. Module detection and related test fixtures use the same paths.

Changes

Kernel path migration

Layer / File(s) Summary
Update discovery paths and test fixtures
pypto_serving/model/deepseek/npu_executor.py, pypto_serving/model/qwen/npu_executor.py, tests/test_*.py
DeepSeekV4 uses models/deepseek_v4_flash_mtp. Qwen3-14B uses models/qwen3_14b. DeepSeekV4 module detection and related test fixtures match the flattened paths.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Poem

A rabbit hops through paths anew,
DeepSeek finds its kernels true.
Qwen’s directory lies flat and neat,
Tests follow with nimble feet.
“No nested burrows!” says the hare.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: adapting kernel paths to flattened pypto-lib model directories.
Description check ✅ Passed The description directly explains the flattened-directory migration, code changes, dependency update, and test path updates.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zhangqi-chen
zhangqi-chen force-pushed the refactor/pypto-lib-flat-model-dirs branch 2 times, most recently from 6ce7078 to 2e6fbd9 Compare August 4, 2026 16:08
pypto-lib replaced models/<family>/<variant>/ with one flat directory per
model build, so the hardcoded kernel paths here no longer resolve.

- Bump the pypto-lib submodule to the revision that carries the rename.
- Qwen3-14B resolves models/qwen3_14b instead of models/qwen3/14b, in both
  the PYPTO_ROOT branch and the checkout walk.
- DeepSeekV4 resolves models/deepseek_v4_flash_mtp instead of
  models/deepseek/v4-flash. Two places assumed the extra family level:
  _is_deepseek_v4_module_file compared three trailing path segments, and
  _load_kernel_modules derived the pypto-lib root it puts on sys.path as
  _kernel_dir.parents[2]. Both now count one level less.
- Retarget the kernel-directory constants in the tests.
@superxf
superxf merged commit 3410104 into hw-native-sys:main Aug 5, 2026
4 checks passed
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.

2 participants