install.sh: git-ref test path installs unsloth-zoo explicitly
unsloth_zoo is an optional extra (not a base dependency), and install.sh always runs the studio deps step with SKIP_STUDIO_BASE=1 (which skips the base.txt install that would otherwise add it). Every other install path names unsloth-zoo explicitly; the pre-merge UNSLOTH_INSTALL_REF git path did not, so a branch build left unsloth_zoo missing and `import unsloth` failed with "Please install unsloth_zoo". Name it explicitly here too. The default PyPI path is unaffected (released unsloth carries zoo as a base dep). Also trims the verbose comment on this block. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
ac3829b381
commit
6c3453f2c0
1 changed files with 7 additions and 6 deletions
13
install.sh
13
install.sh
|
|
@ -2326,14 +2326,15 @@ elif [ -n "$TORCH_INDEX_URL" ]; then
|
|||
--no-deps --reinstall-package unsloth-zoo \
|
||||
"unsloth-zoo @ git+https://github.com/unslothai/unsloth-zoo"
|
||||
elif [ -n "${UNSLOTH_INSTALL_REF:-}" ] && [ "${UNSLOTH_INSTALL_REF}" != "main" ] && [ "$PACKAGE_NAME" = "unsloth" ]; then
|
||||
# Pre-merge branch testing: install unsloth from the requested git ref so its
|
||||
# bundled studio/setup.sh + unsloth Python patches are exercised (released PyPI
|
||||
# would not have them yet). Gated: only the default package ("unsloth") and only a
|
||||
# non-"main" ref; install.ps1 sets UNSLOTH_INSTALL_REF when testing a branch. The
|
||||
# ref is a bare git ref; the URL is a fixed literal -- no --package injection path.
|
||||
# Pre-merge branch testing: install unsloth from a git ref so its bundled
|
||||
# setup.sh + Python patches are exercised (not yet on PyPI). install.ps1 sets
|
||||
# UNSLOTH_INSTALL_REF; gated to the "unsloth" package and a non-"main" ref.
|
||||
# unsloth-zoo is an optional extra (not a base dep) and SKIP_STUDIO_BASE skips
|
||||
# the studio base.txt step, so name it explicitly or it never gets installed.
|
||||
substep "installing unsloth from git ref '$UNSLOTH_INSTALL_REF'..."
|
||||
run_install_cmd "install unsloth (@$UNSLOTH_INSTALL_REF)" uv pip install --python "$_VENV_PY" \
|
||||
--upgrade-package unsloth "unsloth @ git+https://github.com/unslothai/unsloth@${UNSLOTH_INSTALL_REF}"
|
||||
--upgrade-package unsloth --upgrade-package unsloth-zoo \
|
||||
"unsloth @ git+https://github.com/unslothai/unsloth@${UNSLOTH_INSTALL_REF}" unsloth-zoo
|
||||
else
|
||||
run_install_cmd "install unsloth" uv pip install --python "$_VENV_PY" \
|
||||
--upgrade-package unsloth -- "$PACKAGE_NAME"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue