mirror of
https://github.com/unslothai/unsloth
synced 2026-04-21 13:37:39 +00:00
Fix editable install scanning 6,500+ node_modules dirs (#4697)
* fix: scope packages.find to prevent node_modules namespace scanning The packages.find section had no include filter, so setuptools' find_namespace_packages discovered all directories as potential Python packages -- including the 6,557 directories inside studio/frontend/node_modules/ after the frontend build step. This caused the editable install overlay step to run 20,000+ glob operations across 6,619 "packages", which on fast NVMe takes ~5s but on slower disks can take 7+ minutes. Adding an explicit include filter scopes discovery to only the packages we actually ship (unsloth, unsloth_cli, studio, studio.backend), dropping from 6,619 to 58 discovered packages and the editable build time from 5.4s to 1.2s. Also removes the broken kernels/moe exclude (used "/" instead of "." notation so it never matched) and adds a node_modules exclude as a safety net. * fix: use precise node_modules exclude patterns Use "*.node_modules" and "*.node_modules.*" instead of "*.node_modules*" to avoid accidentally excluding valid packages that might contain "node_modules" as a substring in their name.
This commit is contained in:
parent
9311df2b29
commit
a0bca759f3
1 changed files with 2 additions and 1 deletions
|
|
@ -58,7 +58,8 @@ studio = [
|
|||
]
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
exclude = ["images*", "tests*", "kernels/moe*"]
|
||||
include = ["unsloth*", "unsloth_cli*", "studio", "studio.backend*"]
|
||||
exclude = ["images*", "tests*", "*.node_modules", "*.node_modules.*"]
|
||||
|
||||
[project.optional-dependencies]
|
||||
triton = [
|
||||
|
|
|
|||
Loading…
Reference in a new issue