Installer: report the installed Unsloth version - #7265
Conversation
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Code Review
This pull request adds package version reporting to both the PowerShell (install.ps1) and POSIX shell (install.sh) installers by querying Python's importlib.metadata module. Additionally, a new test suite is introduced to verify this behavior in both environments. No review comments were provided, so there is no feedback to address.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Reconcile PR #7256 (Windows torch 2.11 + release preservation, installer comment reduction, torch 2.11 default line) with 77 commits of main install rewrites. Base is main's newer install semantics; this branch's still-novel contributions are layered on top. Key decisions: - install.ps1: kept main's rollback lifecycle (try/finally Restore-StudioVenvRollback, #7342) and the installed-version report (#7265); layered this branch's torch-2.11 allowance (torch<2.12.0 on the Windows CUDA fresh-install, CPU fallback and flavor repairs), the release-preservation port (Get-InstalledTorchVersionRaw / kept-release installs / UNSLOTH_KEPT_TORCH handoff / torch-overrides freeze) and the Exit-InstallFailure UNSLOTH_KEPT_TORCH clear. - install.sh: took main's newer AMD/Strix routing (per-arch index reroute #7264/#7300, runtime-less gfx inference #7305, KFD detection fix #7314, Radeon 8065S regex #7290, signal-restore trap #7342) and the #7365 unsloth pin bump; kept this branch's _TORCH_CEILING/_TORCHVISION_CEILING/_TORCHAUDIO_CEILING refactor widening the default ceiling to torch<2.12.0. - studio/install_python_stack.py: deferred all five code conflicts to main's Strix inference logic (result is AST-identical to main; only comment reductions remain). - studio/setup.ps1: took main's comment covering the whisper.cpp dictation markers (#7095); the UNSLOTH_KEPT_TORCH consumption handoff auto-merged intact. Dropped as superseded by main: this branch's stale unsloth>=2026.7.4 pins (main #7365), the older rocm7.1->rocm7.2 Strix reroute (main #7264/#7300), the narrow Radeon 80[0-9]0S regex (main #7290), and the pre-inference has_hip_torch gate (main's rocm_torch_ready gate, Codex P1 #7305). The two review-item fixes (grep -E in test_torch_constraint.sh, UNSLOTH_KEPT_TORCH clear in Exit-InstallFailure) survive.
The Studio installer says it is installing Unsloth but does not show which version was installed, making install logs harder to verify.
Fix
After the install and migration paths converge, read the selected distribution's version from the new virtual environment and print it before Studio setup:
This is mirrored in
install.shandinstall.ps1, supports custom--packagedistributions, and reads package metadata without importing Unsloth or initializing GPU libraries. A warning is shown if the installed version cannot be determined.Verification
sh -n install.shruff check tests/test_installer_unsloth_version.py