fix: bump transformers to 5.2.0 and pin huggingface_hub in setup.ps1

This commit is contained in:
Roland Tannous 2026-03-07 09:12:12 +00:00
commit 29fa91be07

View file

@ -692,7 +692,7 @@ python "$PSScriptRoot\install_python_stack.py"
$ErrorActionPreference = $prevEAP
# ── Pre-install transformers 5.x into .venv_t5/ ──
# Models like GLM-4.7-Flash need transformers>=5.1.0. Instead of pip-installing
# Models like GLM-4.7-Flash need transformers>=5.2.0. Instead of pip-installing
# at runtime (slow, ~10-15s), we pre-install into a separate directory.
# The training subprocess just prepends .venv_t5/ to sys.path — instant switch.
Write-Host ""
@ -702,8 +702,8 @@ if (Test-Path $VenvT5Dir) { Remove-Item -Recurse -Force $VenvT5Dir }
New-Item -ItemType Directory -Path $VenvT5Dir -Force | Out-Null
$prevEAP_t5 = $ErrorActionPreference
$ErrorActionPreference = "Continue"
pip install --target $VenvT5Dir --no-deps "transformers==5.1.0" 2>&1 | Out-Null
pip install --target $VenvT5Dir --no-deps "huggingface_hub>=1.3.0" 2>&1 | Out-Null
pip install --target $VenvT5Dir --no-deps "transformers==5.2.0" 2>&1 | Out-Null
pip install --target $VenvT5Dir --no-deps "huggingface_hub==1.3.0" 2>&1 | Out-Null
$ErrorActionPreference = $prevEAP_t5
Write-Host "[OK] Transformers 5.x pre-installed to .venv_t5/" -ForegroundColor Green