unsloth/studio
Daniel Han 9bfd4bc58c fix(install): retry GitHub API 403 with Retry-After / X-RateLimit-Reset
Anonymous calls to api.github.com share a 60-req/hour bucket per
runner IP. CI fleets exhaust this trivially -- e.g. PR 5322 run
25490821956 / job 74798111390 hit 403 on the very first
ggml-org/llama.cpp /releases?per_page=100&page=1 call, fell back
to source build, and the workflow asserter then bailed because it
expects the prebuilt path to succeed. install_llama_prebuilt.py
gave up on 403 in one shot:

  raise RuntimeError(f"GitHub API returned 403 for {url}{hint}")

Now: treat 403 against api.github.com as retryable (real 403s on
other hosts -- private artefact downloads, auth failures -- stay
non-retryable). The existing download_bytes retry loop picks it
up automatically. sleep_backoff() takes an optional `exc=` and
honours the Retry-After / X-RateLimit-Reset headers so the wait
is accurate, capped at 60s (anything longer means the source
build fallback is faster than waiting). After all retries, the
existing RuntimeError surface is preserved -- callers fall back
to source build exactly as today, just less often.

Combined with passing GH_TOKEN to the install step (which the
Mac and Linux GGUF jobs on this branch already do, see e.g.
studio-inference-smoke.yml line 105), the prebuilt path is now
robust against both transient 403 blips AND sustained anonymous
rate-limit exhaustion: GH_TOKEN bumps the bucket from 60 to
5000 req/hour, and the new retry/header-honouring logic
absorbs the remaining flakes.
2026-05-07 11:23:30 +00:00
..
backend Merge remote-tracking branch 'origin/main' into ci/workflow-permissions-and-fewer-skips 2026-05-07 10:58:10 +00:00
frontend Merge remote-tracking branch 'origin/main' into ci/workflow-permissions-and-fewer-skips 2026-05-07 10:58:10 +00:00
src-tauri install: support STUDIO_HOME / UNSLOTH_STUDIO_HOME for custom install paths (#5190) 2026-05-05 23:17:40 -07:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
install_llama_prebuilt.py fix(install): retry GitHub API 403 with Retry-After / X-RateLimit-Reset 2026-05-07 11:23:30 +00:00
install_python_stack.py Add native GGUF intake to Studio (#5246) 2026-05-04 11:46:18 +02:00
LICENSE.AGPL-3.0 Add AGPL-3.0 license to studio folder 2026-03-09 19:36:25 +00:00
setup.bat Final cleanup 2026-03-12 18:28:04 +00:00
setup.ps1 install: support STUDIO_HOME / UNSLOTH_STUDIO_HOME for custom install paths (#5190) 2026-05-05 23:17:40 -07:00
setup.sh Route CPU-only Linux x86_64 to ggml-org/llama.cpp prebuilts (#5302) 2026-05-05 23:22:22 -07:00
Unsloth_Studio_Colab.ipynb studio: add --local to setup.sh + overlay unsloth-zoo from git main (#5252) 2026-05-02 08:51:56 +04:00