{"record":{"id":"1a45dda3346c627e","repo":"unslothai/unsloth","slug":"str-exc-1a45dd","errorCode":null,"errorMessage":"{str(exc)}","messagePattern":"\\{str\\(exc\\)\\}","errorType":"http","errorClass":"ExactResumeResourcesUnavailable","httpStatus":409,"severity":"error","filePath":"studio/backend/routes/training.py","lineNumber":1503,"sourceCode":"        }\n\n        # Latest-sidecar models size and train 16-bit (same flip as chat load): 4-bit is disabled for\n        # brand-new architectures, so VRAM checks must not underestimate a load the worker refuses.\n        from core.training.provenance import (\n            ExactResumeResourcesUnavailable,\n            effective_training_load_in_4bit,\n        )\n\n        if training_kwargs[\"load_in_4bit\"]:\n            from core.training.training import resolve_training_model_load_target\n\n            try:\n                model_load_target = await asyncio.to_thread(\n                    resolve_training_model_load_target,\n                    training_kwargs,\n                )\n            except ExactResumeResourcesUnavailable as exc:\n                raise HTTPException(status_code = 409, detail = str(exc))\n            try:\n                effective_load_in_4bit = await asyncio.to_thread(\n                    effective_training_load_in_4bit,\n                    training_kwargs,\n                    model_load_target,\n                    training_kwargs[\"hf_token\"] or None,\n                )\n            except ExactResumeResourcesUnavailable as exc:\n                raise HTTPException(status_code = 409, detail = str(exc))\n            if not effective_load_in_4bit:\n                training_kwargs[\"load_in_4bit\"] = False\n                logger.info(\n                    \"Latest-transformers sidecar active for %s - sizing and \"\n                    \"training in 16-bit (4-bit is disabled for brand-new \"\n                    \"architectures)\",\n                    model_load_target,\n                )\n","sourceCodeStart":1485,"sourceCodeEnd":1521,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/studio/backend/routes/training.py#L1485-L1521","documentation":"HTTP 409 wrapping ExactResumeResourcesUnavailable, raised when resolve_training_model_load_target or effective_training_load_in_4bit cannot reproduce the exact resources (model load mode, quantization setup) a resume checkpoint was created with. The route only translates the exception; the detail text comes from str(exc) of the underlying core-training exception. 422-style client fixes are usually impossible — the environment or checkpoint pin is the problem.","triggerScenarios":"POST /training/start with a resume checkpoint whose original model load configuration (e.g. 4-bit quantized base) cannot be satisfied: the pinned base model revision was removed, the 4-bit runtime is unavailable, or the cached model pin no longer matches.","commonSituations":"Resuming after the transformers sidecar was swapped/upgraded, after the HF cache was pruned, or after the pinned model repo revision (specific sha) disappeared from the Hub.","solutions":["Read the detail message: it names the exact missing resource (revision id, cached model pin, or load mode).","Restore the missing resource: re-download the pinned base model revision or re-enable the 4-bit runtime that the checkpoint requires.","If the pin is unrecoverable, start a fresh run instead of resuming, or resume from a different checkpoint whose resources still exist.","If a sidecar install was mid-swap, retry after it completes (see SidecarSwapInProgress 409)."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { await startTraining(payload) } catch (e) {\n  if (e.status === 409 && e.detail) {\n    // detail names the missing resource (pinned revision / cached model / load mode)\n    logWarn('Resume resources unavailable:', e.detail)\n    if (await askUser('Start fresh instead of resuming?')) return startTraining({...payload, resume_from: null})\n  }\n  throw e\n}","preventionTips":["Keep the pinned base-model revision cached (do not prune HF cache mid-project).","Record which runtime (transformers version, 4-bit mode) produced each checkpoint so resume environments can be matched.","Treat 409-on-resume as an environment mismatch signal, not a transient network error."],"tags":["resume","checkpoint","quantization","conflict","http-409"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}