Repository navigation
Windows on ARM: stop reusing an ARM64 interpreter, and add an inference-only tier - #8599
danielhanchen wants to merge 57 commits into
Conversation
…ce-only tier pyarrow ships no win_arm64 wheel at any version and datasets requires it, so a native ARM64 Python cannot install the Studio stack. install.ps1 has swapped a freshly selected interpreter for x64 since #7549, but every path that REUSES one checked version and conda-ness only, so a migrated venv or an UNSLOTH_SETUP_PYTHON handoff still died in a pyarrow source build. - install.ps1: bootstrap x64 by default on an ARM64 host, re-probe a migrated venv and rebuild it through the existing rollback when it is not win-amd64. - setup.ps1: one Test-CompatibleSetupPythonArch gate on all five interpreter paths, a clear failure for an ARM64 environment, and --architecture x64 for winget. - install_python_stack.py: preflight before the venv is touched. - install.sh: range-check --python / UNSLOTH_PYTHON instead of surfacing an unsupported minor as a bare pyarrow resolver error. When no x64 interpreter can be obtained, install the ARM64 inference-only tier (UNSLOTH_NO_DATASETS + .unsloth-no-datasets marker) rather than fail: it drops the packages with no win_arm64 wheel, gates the dataset routes to 503 and reports chat_only datasets_unavailable so the UI explains the greyed-out Train. Fixes #8495
…p tensorboard UV_OVERRIDE reaches neither a --no-deps install (uv resolves nothing to override) nor the pip fallback (it does not read the variable), so a lifted scikit-learn was still installed at its pinned 1.7.1 and source-built. tensorboard requires grpcio, which has no win_arm64 wheel and cannot build there; only the training worker writes TensorBoard logs, which this tier does not have.
The skip sets are written with hyphens and the requirement files are not: extras-no-deps.txt says pytorch_tokenizers and no-torch-runtime.txt says hf_transfer, so a raw-text filter let both through and the ARM64 install tried to build them from source.
Only 46.0.0 through 46.0.3 ship one, so studio.txt's open cryptography>=42.0.0 resolved to the newest release and then needed a Rust toolchain to build.
The <47 ceiling still resolved to 46.0.7, which has no ARM64 Windows wheel; only 46.0.0 through 46.0.3 do.
…arch # Conflicts: # studio/install_python_stack.py
…n settles It does not depend on the hardware pass and cannot change, so gating it on DETECTION_COMPLETE left the first health replies with chat_only set and no reason, and the UI polling for a verdict that was already known.
|
The ARM64 inference-only tier is now verified end to end on a real Windows ARM64 host ( Run: install with the tier active, then boot Studio and exercise it. So on a Snapdragon with no x64 Python obtainable: the install completes, the venv stays native ARM64, Getting there took several rounds and each one was a real bug rather than a flake, so they are worth recording:
After the last one I stopped finding these one at a time: a strict wheels-only resolution with dependencies now passes for studio.txt, no-torch-runtime.txt and data-designer-deps.txt on Also green on the same branch: |
A platform-isolation audit of this PR found the datasets gate telling the wrong story to the wrong people. _UNAVAILABLE_MSG was a single constant: ...publishes no wheels for native ARM64 Windows... Install x64 Python from https://www.python.org/downloads/windows/ (it runs emulated)... ARM64 Windows is the REASON the gate exists, but it is not the only way to reach it. datasets_available() answers False in any environment missing the library, so an ordinary Linux install with a half-finished venv, or anyone setting UNSLOTH_FORCE_NO_DATASETS=1 to reproduce a report, got told to download an emulated x64 interpreter for a machine they are not sitting at. The real remedy was nowhere in the text. Two messages now. The tier keeps its own, unchanged in substance. Everyone else gets the plain one: the library is not installed, here is what that costs you, install it. Both still say what is lost, since that is the part every caller needs. The predicate is sysconfig.get_platform() == "win-arm64" behind a win32 check, not platform.machine(), because the question is which wheels THIS interpreter can install. An x64 Python emulated on ARM hardware answers win-amd64 and can install pyarrow, so it must not get the tier text -- which is exactly the state the tier's own advice tells users to reach. Three tests. The old one asserted the detail always names x64 and arm64, which enshrined the bug, so it is now split: one that the chosen text names a fix at all, one that the ARM64 wording cannot leak to anyone else, and one that pins the predicate against emulation and against Linux and macOS. studio/backend/tests/test_datasets_availability.py 23 passed
|
Platform-isolation audit of this PR, against the requirement that a fix for one platform must not change behaviour on the others. One real bug found and fixed in 89fe74f, one scoping point disclosed. Fixed: the ARM64 advice was reaching everyone
Now two messages. The tier keeps its own, unchanged in substance; everyone else is told the library is not installed, what that costs, and to install it. The predicate is The pre-existing test asserted the detail always names x64 and arm64, which enshrined the bug. Split into three: the chosen text names a fix, the ARM64 wording cannot leak, and the predicate holds against emulation, Linux and macOS. Disclosed, not changed: the
|
UNSLOTH_NO_DATASETS=1 turns the inference-only tier on for an x64 install too, and Get-ArmFilteredRequirements then rewrote pymupdf, av, scikit-learn and cryptography to their ARM64 floors on a machine where the pinned, tested versions all have wheels. install_python_stack.py already gated its own lift on IS_WINDOWS_ARM64_PYTHON; the PowerShell half now matches. The skips still apply on both halves: asking for no datasets means no datasets whatever the architecture.
Simulation results for this PRAhead of merging I wanted the before/after answered by something other than reading the diff, so I ran the resolver and the runtime directly. Nine simulations, all on this branch, plus the real Before this PR
So the report is a real failure, not a configuration mistake: on a native ARM64 interpreter the install cannot succeed at any version. Four of those are pure Python and ship a After this PRThe same resolution completes with 104 packages, wheels only, no source build. Does it change anything for existing users
Every non-ARM64-Windows target resolves to exactly the same package set at exactly the same versions as before. The installer also renders byte-identical uv commands on all eight OS/arch cells outside native ARM64 Windows, checked by loading the pre-PR and post-PR modules side by side with Other things pinned down:
Test suitesRun on this branch and on main in the same environment, so the pre-existing failures in this box (no GPU headroom for some tests, no
The failure sets differ by three tests, all of them flaky or environment-bound and none touching this change: two fail on main and pass here, one ( One fix from the simulations
|
Sixteen review findings against the Windows-on-ARM tier, grouped by what they actually break. The tier could never verify. verify_install() checked the whole of studio.txt regardless of the tier it had just recorded, so an install that deliberately omits datasets, pandas, sqlite-vec and ddgs reported studio_deps_missing on every single verification: setup forced another dependency pass each run and the desktop preflight rejected it. missing_requirements() now takes the omissions and verify_install() reads them from the recorded tier. overrides-win-arm64.txt joins the tracked requirement files -- on a --local ARM64 install it decides the installed PyMuPDF, PyAV, scikit-learn and cryptography, and untracked, editing it left the fingerprint unchanged. The tier could not import unsloth. trl was skipped as "requires datasets unconditionally", but it is a py3-none-any wheel that installs on ARM64, every step that installs it is a --no-deps step, and its __init__ is a _LazyModule with no eager datasets reference. unsloth/models/_utils.py imports it unconditionally, so dropping it made line 6 of the inference worker raise ModuleNotFoundError in a tier that advertises chat. openai-whisper takes its place: extras.txt is the one step resolved with dependencies and Whisper declares tiktoken, so filtering the direct tiktoken line let uv pull it in transitively and source-build it anyway. The fresh ARM64 branch installed unsloth --no-deps plus pydantic and then ran `unsloth studio setup`, whose entry point imports typer at module scope -- it now lays down the filtered no-torch-runtime.txt like the two other --no-deps branches. The fallback's UNSLOTH_NO_DATASETS export is restored afterwards, or an `irm | iex` shell stays pinned to the tier through the x64 retry the failure message itself asks for. Opting in now selects a native interpreter rather than accepting whatever the py launcher hands out first, which on a mixed box was an emulated x64 build with the training packages stripped: the disadvantages of both tiers. setup.ps1 accepts the whole documented truthy set instead of only "1", and treats a present-but-ARM64 interpreter as no usable Python so the x64 winget bootstrap can run instead of hard-exiting "no supported version" on a machine with a supported 3.12. The gate covered one mount of three. /api/datasets is the retained compatibility alias and reaches the same formatting service; Data Recipes reads seeds through pandas and load_dataset; the diffusion example importer runs load_dataset directly; and mcp_server calls start_training() as a function, where FastAPI never runs the decorator dependency. All four answer 503 now. The probe also asks for pyarrow: datasets on disk without its storage engine passed the gate and then raised ModuleNotFoundError, which is the 500 this exists to replace. Finally, chat_only=datasets_unavailable no longer hides models. Every other chat-only reason is a statement about the runtime; this one is not, and reusing it made ordinary safetensors models unselectable on an install that keeps torch and Transformers. Data Recipes is what the tier actually loses, so that is what the sidebar greys out. install.sh rejects 3.15+ outright rather than warning: pyproject declares requires-python <3.15, so uv cannot install unsloth there at all, which is the late resolver failure this guard was added to replace.
|
16 of the 17 inline items are genuine and fixed in f953cc6, each with a named test that goes red if the fix is reverted. The four review bodies are boilerplate headers with no content. The two worst were reachable in the tier's normal path. Three gating holes are now closed: the legacy On the chat_only verdict hiding safetensors, agreed, but the blast radius is narrower than stated: an ARM64 Windows box has no CUDA or ROCm, so The CodeQL alert is a false positive and I have reacted accordingly. The flagged Counts after the round: datasets_availability 23 to 36, windows_arm64_python_choice 19 to 37, cross_platform_parity 87 to 89, install_python_stack 62 to 68, the shell guard 36 to 41. Wider regression run 334 passed, 11 skipped. The PowerShell tests execute Two things I want on the record rather than buried. There is no Windows-on-ARM machine here, so the central predicate, that |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f953cc6409
ℹ️ 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".
| if not datasets_available(): | ||
| return True, "datasets_unavailable", datasets_unavailable_detail() |
There was a problem hiding this comment.
Exempt the dataset-only tier throughout the model picker
When the inference-only tier is active, publishing chat_only=True still makes the primary model picker hide supported safetensors models: features/model-picker/components/model-selector/pickers.tsx uses raw chatOnly in the recommended-model filter, local-directory filter, and visibleCachedModelRows. The chat-adapter exemption added after the prior review only fixes autoload validation; users opening the picker still cannot select or download the Transformers models this tier retains. This remaining direct picker gating is fresh evidence that the dataset-only verdict needs a training-specific capability or the same reason exemption throughout the picker.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not taking this one: the picker behaves identically with and without this PR on that machine. The tier is a native ARM64 Windows box with CPU-only torch, so detect_hardware() reaches the CPU fallback and sets CHAT_ONLY = True with reason no_gpu (utils/hardware/hardware.py:646) whatever this verdict says. All this change does there is replace the reason string with one that explains itself. Showing safetensors models on chat-only hosts is a separate feature covering every CPU-only Linux, Windows and Intel Mac install, not something this PR regressed.
| $wanted = $sameMinor | Where-Object { $_.Arch -eq $wantedArch } | Select-Object -First 1 | ||
| if ($wanted) { return $wanted } | ||
| if (-not $X64Only) { return $sameMinor[0] } |
There was a problem hiding this comment.
Bootstrap ARM64 Python for an explicit native-tier request
On an ARM64 host with only an x64 Python installed, UNSLOTH_NO_DATASETS=1 finds no native candidate here and then falls through to returning that x64 candidate. Because $DetectedPython is non-null, the installer never reaches the ARM64 winget/python.org bootstrap, while the later inference-only branch still strips the training dependencies, producing the disadvantages of both tiers. Fresh evidence after the prior selection fix is this explicit fallback to $sameMinor[0]; return no candidate when $preferArm64 cannot be satisfied so the install path obtains a native interpreter.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not taking this one: UNSLOTH_NO_DATASETS=1 is an explicit opt-in for an install without the datasets stack, not a request for a native interpreter. Returning no candidate so the ARM64 bootstrap runs would install a second, native Python on a machine that already has a working x64 one, and build the venv on the interpreter with fewer wheels. The x64 candidate is the better environment, and the tier still installs everything except what was opted out of.
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! 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". |
…e venv from the request
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 179989efd5
ℹ️ 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".
| case "$_USER_PYTHON" in | ||
| */*|*\\*) | ||
| # A path names an interpreter just as "3.9" does, so ask it rather than | ||
| # letting it through: /usr/bin/python3.9 hit the same 3.11-only plugins | ||
| # this gate exists to catch, only minutes later and under another name. | ||
| # Skipped when it cannot be run: resolving the request is not this gate's | ||
| # job, and the steps below report a bad path themselves. | ||
| _probe_ver=$("$_USER_PYTHON" -c 'import sys; print("%d.%d" % sys.version_info[:2])' 2>/dev/null || true) | ||
| case "$_probe_ver" in | ||
| [0-9]*.[0-9]*) | ||
| _req_major=${_probe_ver%%.*} | ||
| _req_minor=${_probe_ver#*.} ;; | ||
| esac ;; |
There was a problem hiding this comment.
Probe bare interpreter names before accepting them
When --python or UNSLOTH_PYTHON names an executable on PATH (for example python3.9) rather than a path containing / or \, this case matches neither arm, so the new range gate accepts it and later passes it to uv venv --python; the local uv venv --help describes that option as accepting a Python interpreter, and uv python find python3.13 confirms bare executable names resolve. Consequently this common spelling still creates an unsupported 3.9/3.10 environment and encounters the late dependency failure the gate is intended to prevent; probe non-version interpreter requests through command -v as well as explicit paths.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed. A request that is neither a version nor a path now resolves through command -v and is probed the same way a path is, so python3.9 is refused and python3.12 is accepted. A uv download name (cpython-3.12-linux-x86_64-none) is not on PATH, so it still passes through untouched. The probe also takes the minor only up to the next dot now: it asks for two fields, but a wrapper answering 3.9.1 would otherwise abort dash with "Illegal number". The shell guard suite covers all of it, 52 passed under sh, dash and bash.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ae8e4d6893
ℹ️ 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".
| assert "$applyLifts = ((Get-HostMachineArch)" not in body | ||
|
|
||
|
|
||
| def test_lifts_do_not_apply_on_an_x64_host(): |
There was a problem hiding this comment.
Skip the x64 lift test without PowerShell
On Linux or other minimal environments where pwsh is unavailable, this test calls _pwsh() unconditionally and fails with FileNotFoundError before reaching its assertions. The PowerShell availability decorator is currently attached to the preceding source-only test, while all neighboring tests that execute _pwsh() are skipped appropriately; move or add the decorator here so the suite remains runnable without PowerShell.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed. The guard moved to test_lifts_do_not_apply_on_an_x64_host, and came off test_lifts_follow_the_venv_interpreter_not_the_host, which only reads install.ps1 as text. Added an AST check over this file so the next one cannot drift: it fails if any test that calls _pwsh() lacks the skipif. Verified both ways, 53 passed with pwsh on PATH and 25 passed / 28 skipped with it removed.
…racted harness stays runnable
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7b8e2cc222
ℹ️ 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".
| if actual_req is not None and NO_DATASETS and NO_DATASETS_SKIP_PACKAGES: | ||
| actual_req = _filter_requirements(actual_req, NO_DATASETS_SKIP_PACKAGES) |
There was a problem hiding this comment.
Limit ARM-only skips to ARM64 interpreters
When UNSLOTH_NO_DATASETS=1 is used on x64 Windows or Linux, this unconditional filter removes the entire ARM64 wheel-gap set, not just the datasets stack. Packages such as sqlite-vec, ddgs, openai-whisper, librosa, and pytorch-tokenizers are therefore omitted even though they are installable on those platforms, disabling RAG, web search, speech-to-text, and model-specific inference features. Split the dataset-specific omissions from the win-arm64-only omissions, or apply the latter only when IS_WINDOWS_ARM64_PYTHON is true.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed by splitting the two reasons. NO_DATASETS_SKIP_PACKAGES is now just the data stack (datasets, pandas), dropped wherever the tier is on; the wheel gap moved to WIN_ARM64_SKIP_PACKAGES, filtered only when IS_WINDOWS_ARM64_PYTHON. So an x64 UNSLOTH_NO_DATASETS=1 install keeps sqlite-vec, ddgs, openai-whisper, librosa, tiktoken and the export helpers, and with them RAG, web search and speech-to-text. Verification follows: WIN_ARM64_OMITTED_REQUIREMENTS is only added to the omit list when the manifest records a win-arm64 interpreter, so an x64 tier install that really is missing those still reports studio_deps_missing. The install.ps1 list is the union, since that path only runs on ARM64, and the parity test now compares it against both sets.
| if entry.get("loader") == "hf_dataset": | ||
| await require_datasets_http() |
There was a problem hiding this comment.
Preserve idempotent imports without datasets
When an hf_dataset example's destination already contains images or clips, this endpoint promises to return the existing folder without loading anything, but the new dependency check returns 503 before the no-op check at lines 4236-4238. This blocks users who imported an example before moving to the inference-only tier from reusing that already-materialized diffusion dataset, even though diffusion training remains supported there. Defer the datasets check until the code has established that _materialize_hf_dataset() will actually run.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed. The gate moved off the route to the point where _materialize_hf_dataset is about to run, after the emptiness check, so an already-materialized folder is still returned as-is on the tier. That path is synchronous under the import lock, so it calls a new require_datasets_sync() that raises the same 503; require_datasets_http stays async for the dependency callers.
…import where it materializes
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. 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". |
|
I reviewed the premise, interpreter selection and reuse paths, native ARM64 fallback, runtime gating, and cross-platform impact. I found no concrete merge blocker. The problem is real and the fix is at the correct layer. Studio's dataset preparation and training stack uses Hugging Face If x64 Python cannot be installed, or the user explicitly chooses native ARM64, the PR falls back to an inference-only tier instead of failing the installation. Its state persists across updates, unresolvable dependencies are filtered, dataset and training entry points return an explicit unavailable response, and health plus frontend capability handling preserves chat and supported inference features. The tier remains inert unless selected, and the manifest handling avoids invalidating existing non-ARM installs. The public Windows ARM clean-install job passes. Locally, the installer parity, Python stack, manifest, datasets availability, interpreter guard, and health capability suites all passed, including 384 focused test cases plus the executable Windows ARM64 selection cases. Recommendation: MERGE. |
|
Confirmed the reuse paths in install.ps1 and setup.ps1 only check version and conda today, so an ARM64 interpreter does get reused and lands on the pyarrow build. The direction is right, but this also carries the Linux --python range check, the sidebar and status changes and the whole no-datasets tier; could you split the interpreter arch fix out so it can land on its own, and take a look at Backend CI on Python 3.11, which passes on main and on the last ten merged PRs? |
Fixes #8495.
Unsloth Desktop and Studio fail on a Snapdragon X2 Elite with
Installation failed: install unsloth failed (exit code 1): pyarrow.Why
pyarrowhas never published awin_arm64wheel at any version, anddatasets==4.3.0requirespyarrow>=21, so on a native ARM64 interpreter uv falls through to an Arrow C++ source build and dies. install.ps1 has swapped a freshly selected interpreter for an x64 one since #7549, and on a clean machine that still works. Every path that reuses an interpreter checked version and conda-ness only:install.ps1:2963-3005.venv, CWD-relative) reused with no arch probe;Test-VenvPythonReadyonly runssys.exit(0)setup.ps1:3223-3243,:3274-3284,:3651-3661UNSLOTH_SETUP_PYTHONaccepted on a bareTest-Pathsetup.ps1:3329-3347--architecture x64, so it installs the ARM64 packageinstall_python_stack.pySo a machine with an ARM64 venv from an earlier run, or one where the x64 bootstrap could not complete, still reached the pyarrow build.
The Linux half is a separate bug in the same message:
install.shnever range-checked--python/UNSLOTH_PYTHON, so an unsupported minor went straight touv venvand surfaced minutes later as a bare dependency name. On 3.9 that name ispyarrow(constraints.txt pinspyarrow==23.0.1, which has no cp39 wheel on any platform), andmatplotlib,pymupdf,pymupdf4llmandfastmcpare 3.10+ as well.What changed
Architecture is now checked wherever an interpreter is chosen or reused
install.ps1: bootstraps x64 by default on an ARM64 host rather than installing an ARM64 CPython it must immediately replace; re-probes a migrated venv with the existingGet-PythonPlatformTagand rebuilds it throughStart-StudioVenvRollbackwhen it is notwin-amd64.setup.ps1: oneTest-CompatibleSetupPythonArchpredicate applied to all five interpreter paths, a clear failure for an ARM64 environment naming the fix instead of the symptom, and--architecture x64on the winget fallback.install_python_stack.py: preflight before the manifest is dropped, so nothing is mutated on the paths that reach the installer directly.install.sh: rejects a Python the stack cannot install on. Below 3.10 is a hard error naming the packages; 3.10 still resolves the whole set today so it stays allowed even though the Windows floor is 3.11; above 3.13 warns and continues, since unproven is not the same as known broken.Every check reads
sysconfig.get_platform(), never the host arch: the supported Windows on ARM configuration is an emulated x64 CPython, where the host isarm64and the answer that matters iswin-amd64.ARM64 inference-only tier, when x64 cannot be obtained
Warning and then failing inside a CMake build is worse than saying so up front, but refusing outright leaves a Snapdragon with nothing.
datasetsturns out to be almost entirely lazy: the module-level import graph reachable frommain.py,run.pyandroutes/contains neitherdatasetsnorpyarrow, and the only module-scopefrom datasets import Dataset(core/training/trainer.py:59) loads inside the spawned training worker. So chat, model downloads and the Images/Video pages work without it. Training does not, on any platform.The tier generalises the existing
--no-torchmachinery rather than adding a parallel one: a.unsloth-no-datasetsmarker plus manifest key (sounsloth studio updatestays in tier), a skip set for packages with nowin_arm64wheel at any version, andsingle-env/overrides-win-arm64.txtfor pins that predate theirs. It is entered automatically whenInstall-X64Pythonfails, or up front withUNSLOTH_NO_DATASETS=1for someone who would rather keep a native ARM64 environment than run x64 emulated.Dropped (no
win_arm64wheel at any version, each already degrades at runtime):datasets,trl(requires datasets),sqlite-vec(RAG already setsRAG_AVAILABLE = Falsewithout it),tiktoken,hf-transfer(the hub paths already force it off),ddgs(pulls brotli),pandas(only the 3.0 line has wheels and studio.txt pins 2.3.3 deliberately),pytorch-tokenizers,torch-c-dlpack-ext,MeCab,tensorboard(pulls grpcio, whose BoringSSL ASM has no ARM64 Windows target).Lifted:
pymupdf>=1.28.2,av>=17.0.0,scikit-learn>=1.8.0.Runtime degradation instead of a 500
utils/datasets_availability.pymirrorsstorage/rag_db.py: a module flag, aRuntimeErrorsubclass, and a FastAPI dependency returning 503 with a stated reason. It never importsdatasets, onlyfind_spec. Gated: the whole hub datasets router, and the two training start endpoints./status,/progressand/metricsstay reachable so a UI already polling keeps working./api/healthreportschat_onlywith reasondatasets_unavailable, which the sidebar already knows how to explain.Testing
Verified on a real Windows ARM64 host (
windows-11-armrunner), not simulated:sysconfig.get_platform()reportswin-arm64andpyarrow==23.0.1is unresolvable; the wheel gaps in studio.txt arepandas,datasets,sqlite-vec,pymupdf. The same set resolves for x64.Get-CompatiblePythonVersionaccepted awin-arm64interpreter for reuse (reuse gate verdict = 3.13.14). After it, the same runner reports the interpreter rejected for a full install and accepted for the tier.install.ps1run swaps to x64 and produces awin-amd64venv.ubuntu-24.04-arm: every studio requirement resolves andinstall.shcompletes, so aarch64 Linux keeps installing natively and is untouched by any of this.ubuntu-latest:pyarrow==23.0.1has no cp39 wheel, andmatplotlib,fastmcp,pymupdf,pymupdf4llmare 3.10+ too.Suites:
tests/pythonis 1061 passed against 1047 on main, with the same three pre-existing failures on both (a network dependent tokenizers e2e, the no-torch sandbox, and an ordering dependent RL pickling test that passes in isolation on either branch). All 47tests/shscripts pass. 20 new backend tests, plus new cases intest_windows_arm64_python_choice.py,test_cross_platform_parity.py,test_install_python_stack.pyandtest_install_python_guard.sh. The PowerShell and Python skip and lift sets are held together by parity tests, since they are two implementations of one rule.The end to end tier install on
windows-11-armis still being driven to green on a staging fork. It has already found four real bugs that unit tests could not: install.ps1 handing uv an unfiltered requirements file, constraint ceilings that an override cannot lift (only remove),UV_OVERRIDEreaching neither a--no-depsinstall nor the pip fallback, and_filter_requirementscomparing raw text sopytorch_tokenizersnever matchedpytorch-tokenizers. All four are fixed here. I will report the final run on this PR.Compatibility
Behaviour changes only when
Get-HostMachineArchisarm64on Windows, or when an out of range--pythonis requested. x64 Windows, Linux x86_64 and aarch64, WSL, and macOS on both Intel and Apple Silicon keep their exact current code paths. The tier is inert without the marker or the env var, so existing installs readDATASETS_AVAILABLE = Trueand see no change. No trainer, kernel or torch.compile surface is touched.