unsloth/studio/backend/utils
Daniel Han 1daaa5cbb4
Let a decode failure degrade instead of escaping a fail-closed helper (#7487)
* Let a decode failure degrade instead of escaping a fail-closed helper

Pinning utf-8 makes a read that used to return mojibake on Windows raise
instead. 33 of those reads sit under a handler catching OSError or
json.JSONDecodeError but not UnicodeDecodeError, which subclasses
ValueError, so a corrupt file would now escape a helper written to return
a default. Adds UnicodeDecodeError to those tuples only.

* Treat an undecodable install lock as stale instead of retrying forever
2026-07-27 03:26:08 -07:00
..
datasets Studio: add configurable model download location (#7274) 2026-07-23 01:34:38 -07:00
hardware Let a decode failure degrade instead of escaping a fail-closed helper (#7487) 2026-07-27 03:26:08 -07:00
inference Unsloth run/start: per-model recommended sampling and override flags (#7335) 2026-07-23 20:49:54 -07:00
models Pin utf-8 on shipping-code text I/O instead of the operator locale (#7486) 2026-07-27 02:14:20 -07:00
paths Let a decode failure degrade instead of escaping a fail-closed helper (#7487) 2026-07-27 03:26:08 -07:00
prebuilt Studio: add local speech-to-text dictation engine (#7095) 2026-07-23 01:39:03 -07:00
security Pin utf-8 on shipping-code text I/O instead of the operator locale (#7486) 2026-07-27 02:14:20 -07:00
.gitkeep root studio folder 2026-02-02 09:13:49 +00:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
_studio_release_build.py Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
api_errors.py Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
cache_cleanup.py Reduce and tighten code comments and docstrings repo-wide (#6095) 2026-06-08 23:09:51 -07:00
client_ip.py Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
coding_agents.py feat: detect installed coding agent CLIs in Studio settings (#6909) 2026-07-08 05:26:50 -07:00
cpu_threads.py Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
downsample.py Formatting: ruff line-length 100, kwarg-spacing passes, drop blank after short local imports (#6079) 2026-06-08 04:24:13 -07:00
embedding_model_settings.py Studio: customizable RAG embedding model with HF search, settings tab reorganization (#6800) 2026-07-02 05:26:33 -07:00
helper_precache_settings.py Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
hf_cache_settings.py Studio: add configurable model download location (#7274) 2026-07-23 01:34:38 -07:00
hf_token_validation.py Studio: validate Hugging Face tokens before use (#7261) 2026-07-20 14:40:14 +01:00
hf_xet_fallback.py Studio: add configurable model download location (#7274) 2026-07-23 01:34:38 -07:00
hidden_models.py Studio: add local speech-to-text dictation engine (#7095) 2026-07-23 01:39:03 -07:00
host_policy.py Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
lifespan_shutdown.py Studio: make lifespan shutdown resilient to a dead default executor (#6307) 2026-06-15 22:51:46 -07:00
llama_cpp_freshness.py Studio: add local speech-to-text dictation engine (#7095) 2026-07-23 01:39:03 -07:00
llama_cpp_update.py Studio: fail fast on out-of-disk instead of a doomed llama.cpp source build (#7420) 2026-07-26 00:11:38 -07:00
mlx_repair.py Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
native_path_leases.py Studio: add configurable model download location (#7274) 2026-07-23 01:34:38 -07:00
node_runtime.py Studio: use an isolated Node.js for the frontend build instead of replacing the system Node/npm (#6533) 2026-06-21 21:17:29 -07:00
openai_auto_switch_settings.py persist llama.cpp KV cache across idle auto-unload (slot save/restore) (#7204) 2026-07-20 00:12:42 -07:00
personalization_settings.py studio: persist personalization (profile, avatar, theme) server-side (#6516) 2026-06-22 04:09:48 -07:00
preview_rate_limit.py Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
preview_sharing_settings.py Studio: require signed capability tokens for /p preview links (#6666) 2026-06-25 21:40:48 -07:00
preview_token.py Studio: require signed capability tokens for /p preview links (#6666) 2026-06-25 21:40:48 -07:00
process_lifetime.py Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
ssm_runtime.py Auto-install SSM kernels (causal-conv1d, mamba-ssm) for inference loads (#6535) 2026-06-22 04:48:29 -07:00
studio_version.py Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
subprocess_compat.py Reduce and tighten code comments and docstrings repo-wide (#6095) 2026-06-08 23:09:51 -07:00
training_runs.py Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
transformers_dtype.py Studio: Fix torch_dtype deprecation warning on startup and ASR load (#6999) 2026-07-13 17:34:25 -03:00
transformers_latest.py Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
transformers_version.py Pin utf-8 on shipping-code text I/O instead of the operator locale (#7486) 2026-07-27 02:14:20 -07:00
update_status.py Studio: make code comments and docstrings more succinct (#6029) 2026-06-08 23:07:28 -07:00
upload_limits.py Studio: add local speech-to-text dictation engine (#7095) 2026-07-23 01:39:03 -07:00
utils.py Let a decode failure degrade instead of escaping a fail-closed helper (#7487) 2026-07-27 03:26:08 -07:00
uv_path_safety.py Make _uv_safe_path space-safe on macOS/Linux (#6503) (#6534) 2026-06-24 04:02:24 -07:00
wheel_utils.py Studio: fix flash-attn and torchao install on Blackwell (sm_100+) GPUs (Closes #6961) (#6970) 2026-07-08 06:38:10 -07:00
whisper_cpp_freshness.py Studio: add local speech-to-text dictation engine (#7095) 2026-07-23 01:39:03 -07:00
whisper_cpp_update.py Studio: add local speech-to-text dictation engine (#7095) 2026-07-23 01:39:03 -07:00