ci: drop redundant pydantic/typer patch step from Windows smoke jobs#5734
ci: drop redundant pydantic/typer patch step from Windows smoke jobs#5734danielhanchen wants to merge 2 commits into
Conversation
Real Windows CI failure, not a flake. Every PR's Studio Windows smoke jobs (Studio API + Auth, OpenAI Anthropic API, Chat UI, Tool calling, JSON images) fail at unsloth studio setup time with SystemError: The installed pydantic-core version (2.47.0) is incompatible with the current pydantic version, which requires 2.46.4. Root cause: no-torch-runtime.txt listed both pydantic and pydantic-core unpinned, then the installers (install.sh, install.ps1, install_python_stack.py update path) ran uv pip install --no-deps -r no-torch-runtime.txt so pip resolved each independently and picked pydantic 2.13.4 (latest, requires pydantic-core==2.46.4) pydantic-core 2.47.0 (latest, mismatched) pydantic's _ensure_pydantic_core_version check then fails on the first import. Linux and Mac runners often happen to have a matching pair cached from a prior unrelated install, so the trip only fires reliably on a fresh Windows venv. Fix: install pydantic WITH deps before the --no-deps no-torch runtime install in every no-torch entry point (two paths each in install.sh and install.ps1, plus install_python_stack.py update path). pip then pins pydantic-core to the exact version pydantic declares, and the next import works. pydantic's transitive deps (annotated-types, pydantic-core, typing-extensions, typing-inspection) are all torch-free so this is safe for the no-torch contract. Drop the now-redundant pydantic / pydantic-core / annotated-types / typing-inspection entries from no-torch-runtime.txt with a header comment explaining the split.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9816b2999e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| - name: Install pyjwt for the JWT-expiry forge test | ||
| run: python -m pip install 'pyjwt>=2.6' |
There was a problem hiding this comment.
Keep venv dep-tree patch until installer fix lands
This removal makes the Windows smoke jobs depend entirely on install.ps1 --no-torch, but in the current tree that path still installs no-torch-runtime.txt with --no-deps (see install.ps1 no-torch install section) and does not perform the separate full-deps pydantic install described in the commit message. On fresh windows-latest runners, that can leave pydantic/pydantic-core out of sync and reintroduce the Studio import failures this patch step was masking, so deleting the step here is premature unless the installer-side fix is merged first.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
The branch includes commit 703eb91 ahead of d312c7a with exactly that separate pip install pydantic step in install.ps1 / install.sh / install_python_stack.py (the install fix from #5733). Confirmed: git log --oneline on chore/drop-redundant-pydantic-typer-workaround shows both commits. The Windows smoke jobs on this PR will exercise the new install path end to end. If the review tool diffed against the original PR head rather than the rebased tip that would explain the stale finding.
PR 5733 fixes the root cause: install.sh / install.ps1 / install_python_stack.py now do a separate `pip install pydantic` (with deps) before the --no-deps no-torch-runtime install, so pip resolves pydantic-core to the exact version pydantic's metadata requires. The Studio venv is consistent on first import. The four Windows smoke YAMLs carried a 'Patch Studio venv with full typer / pydantic dep trees' step that ran AFTER the installer to re-install typer + pydantic + huggingface_hub with deps as a belt-and-suspenders workaround. Six occurrences across the four files. With 5733 landed the workaround is dead weight; remove it. Depends on #5733.
9816b29 to
d312c7a
Compare
|
Addressed in d312c7a by rebasing this branch on top of #5733. The Windows smoke jobs on this PR now exercise the fixed installer (pydantic installed with deps before the --no-deps no-torch-runtime apply) so removing the patch step is proved safe end-to-end before either change lands. If #5733 merges separately I will rebase this back onto main as a workflow-only diff. |
Bundles three independent CI regressions hitting the maintainer PR backlog. Each one is verified end-to-end on a staging fork against real Ubuntu / macOS / Windows GitHub-hosted runners before this lands. 1. Windows --no-torch install: pydantic + pydantic-core drift to incompatible versions under `uv pip install --no-deps -r no-torch-runtime.txt` because pip resolves each independently from latest. pydantic.VERSION 2.13.4 pins pydantic-core==2.46.4 but pydantic-core 2.47.0 was the freshest published wheel, so `import pydantic` raised `SystemError: pydantic-core 2.47.0 is incompatible with the current pydantic version`. Resolve pydantic WITH deps in a focused pip call (install.sh, install.ps1, install_python_stack.py) before the --no-deps no-torch-runtime pass so pip pins pydantic-core to the version pydantic declares. pydantic's transitive deps (annotated-types, pydantic-core, typing-extensions, typing-inspection) are torch-free. Drop the redundant `Patch Studio venv with full typer / pydantic dep trees` workaround from the four Windows smoke YAMLs. Supersedes #5733 + #5734. 2. Linux Studio Update CI: upstream llama.cpp b9261+ split each binary's entry code into a paired `libllama-<binary>-impl.so` shared library. `llama-server` and `llama-quantize` NEEDED-link against `libllama-server-impl.so` / `libllama-quantize-impl.so` with RUNPATH `$ORIGIN`, so the prebuilt overlay must copy those alongside the binaries. Without that, ldd reports them missing, preflight rejects, the installer falls back to source build, and studio-update-smoke annotates `setup.sh idempotency regressed`. Add `libllama-*-impl.so*` to the Linux runtime patterns and lock the pattern in test_rocm_support.TestRuntimePatterns. 3. Mac Studio UI Chat: change-password submit clicked while disabled. The disable gate only checked new + confirm password length, but Playwright's first click landed before the current-password field's React state had committed, so the form was simultaneously logically-invalid (current_password empty) and the button was disabled. Tighten the gate to require `currentPassword.length >= 8` and mirror the same check in the submit handler so Enter / autofill cannot bypass. Supersedes #5738.
|
Superseded by #5741 (now merged). The pydantic-core mismatch, llama.cpp |
Bundles three independent CI regressions hitting the maintainer PR backlog. Each one is verified end-to-end on a staging fork against real Ubuntu / macOS / Windows GitHub-hosted runners before this lands. 1. Windows --no-torch install: pydantic + pydantic-core drift to incompatible versions under `uv pip install --no-deps -r no-torch-runtime.txt` because pip resolves each independently from latest. pydantic.VERSION 2.13.4 pins pydantic-core==2.46.4 but pydantic-core 2.47.0 was the freshest published wheel, so `import pydantic` raised `SystemError: pydantic-core 2.47.0 is incompatible with the current pydantic version`. Resolve pydantic WITH deps in a focused pip call (install.sh, install.ps1, install_python_stack.py) before the --no-deps no-torch-runtime pass so pip pins pydantic-core to the version pydantic declares. pydantic's transitive deps (annotated-types, pydantic-core, typing-extensions, typing-inspection) are torch-free. Drop the redundant `Patch Studio venv with full typer / pydantic dep trees` workaround from the four Windows smoke YAMLs. Supersedes unslothai#5733 + unslothai#5734. 2. Linux Studio Update CI: upstream llama.cpp b9261+ split each binary's entry code into a paired `libllama-<binary>-impl.so` shared library. `llama-server` and `llama-quantize` NEEDED-link against `libllama-server-impl.so` / `libllama-quantize-impl.so` with RUNPATH `$ORIGIN`, so the prebuilt overlay must copy those alongside the binaries. Without that, ldd reports them missing, preflight rejects, the installer falls back to source build, and studio-update-smoke annotates `setup.sh idempotency regressed`. Add `libllama-*-impl.so*` to the Linux runtime patterns and lock the pattern in test_rocm_support.TestRuntimePatterns. 3. Mac Studio UI Chat: change-password submit clicked while disabled. The disable gate only checked new + confirm password length, but Playwright's first click landed before the current-password field's React state had committed, so the form was simultaneously logically-invalid (current_password empty) and the button was disabled. Tighten the gate to require `currentPassword.length >= 8` and mirror the same check in the submit handler so Enter / autofill cannot bypass. Supersedes unslothai#5738.
Summary
Follow-up to #5733. That PR fixes the root cause: install.sh, install.ps1, and install_python_stack.py now run a separate `pip install pydantic` (with deps) before the `--no-deps` install of `no-torch-runtime.txt`, so pip resolves `pydantic-core` to the exact version pydantic's metadata pins. The Studio venv is consistent on first import.
The four Windows smoke YAMLs each carried a `Patch Studio venv with full typer / pydantic dep trees` step that ran after the installer to re-install `typer` + `pydantic` + `huggingface_hub` with deps as a belt-and-suspenders workaround. Six occurrences across the four files. With #5733 landed the workaround is dead weight.
This PR removes those six blocks. No other behavior change.
Files touched
Test plan
Depends on #5733.