unslothai/unsloth · error · HTTPException
Export is not supported on this platform.
Error message
Export is not supported on this platform.
What it means
HTTP 400 raised when utils.hardware.export_capability reports export_supported=False for this host. The capability probe (run off the event loop because a cold import can be slow) decides whether the platform/GPU/driver stack can run export at all; the message comes from export_unsupported_message or falls back to this generic string. Read-only endpoints are not gated so the UI can still show the reason.
Source
Thrown at studio/backend/routes/export.py:70
Keeps the backend authoritative even if a client bypasses the UI gate. Read-only endpoints
(scan/status/logs) are intentionally NOT gated so the Export page can still render the reason.
Also refuses (409) while a latest-transformers install is swapping .venv_t5_latest: an
export worker spawned mid-swap could activate a half-replaced sidecar.
"""
from utils.transformers_latest import is_install_in_progress
if is_install_in_progress():
raise HTTPException(
status_code = 409,
detail = "A transformers installation is in progress. Retry when it completes.",
)
from utils.hardware import export_capability
# Off-loop: detection is deferred past bind, so the first call can wait on a cold import.
cap = await asyncio.to_thread(export_capability)
if not cap.get("export_supported", True):
raise HTTPException(
status_code = 400,
detail = cap.get("export_unsupported_message")
or "Export is not supported on this platform.",
)
@router.post("/load-checkpoint", response_model = ExportOperationResponse)
async def load_checkpoint(
request: LoadCheckpointRequest, current_subject: str = Depends(get_current_subject)
):
"""Load a checkpoint into the export backend (ExportBackend.load_checkpoint).
Export runs in its own subprocess and is allowed to run in parallel with
training and inference. We deliberately do NOT stop training or unload the
chat model here -- if the GPU runs out of memory the load/export fails with
a clear error instead of tearing down the user's other running workloads.
"""
try:View on GitHub (pinned to 203007d190)
Solutions
- Call GET /export/status or the capability probe first and read export_unsupported_message for the precise reason.
- Fix the underlying hardware/software gap (install CUDA-capable drivers, enable GPU passthrough, or install the missing export toolchain).
- If export is not needed on this host, disable the Export page / hide mutating controls based on the read-only status response.
Defensive patterns
Strategy: validation
Validate before calling
const cap = await api.get('/export/capability'); // or read from /export/status
if (!cap.export_supported) {
renderUnsupported(cap.export_unsupported_message);
return;
} Prevention
- Query the read-only status/capability endpoint once on page load and gate the Export UI.
- Do not assume export works on every host — probe hardware before scheduling exports.
When it happens
Trigger: POST to any mutating export endpoint on a machine whose hardware probe fails — e.g. no CUDA device, an unsupported GPU/driver combo, or a missing export-only dependency detected by export_capability().
Common situations: Running the studio backend on a CPU-only box or in a container without GPU passthrough; driver/toolkit versions that the capability check rejects; a fresh environment where the export stack was never installed.
Related errors
- {message}
- Unsupported format. Use webm or gif.
- GGUF conversion produced a symlink, refusing to relocate it:
- GGUF conversion produced no files: no .gguf outputs for {abs
- GGUF conversion produced a symlinked Modelfile, refusing to
AI-assisted analysis of unslothai/unsloth@203007d190 (2026-08-15).
Data as JSON: /api/errors/f1dae23aa8e52aab.
Report an issue: GitHub.