unsloth/studio/backend/core
Unsloth 6492d36719 Address review round 4: refcount concurrent guards, distrust proxy TCP
- Overlapping requests lost offline mid-flight. A later guard saw the
  HF_HUB_OFFLINE that an earlier one had set and took the no-op branch, so
  when the earlier guard exited it restored the constants and sessions while
  the later request was still resolving hub files, dropping it back onto the
  retry path. Each guard now holds its own reference on the refcounted
  force_hf_offline window. A user-supplied offline variable is still left
  untouched, told apart via force_hf_offline_active().
- The socket-timeout fallback trusted a TCP handshake to the proxy, which
  only proves the proxy is up, not that it can reach the hub. A live proxy
  with a blackholed upstream therefore read as reachable. With a proxy
  configured the timeout now stays unreachable; the TCP check is only
  evidence when connecting to the endpoint directly.

Verified: second guard engages and offline survives the first guard's exit,
state fully restored after both; dead-upstream proxy reads unreachable while
a slow direct endpoint still reads reachable; 9 concurrent metadata requests
against an unreachable hub all return 200 in 5.1s total.
2026-07-29 01:49:45 -07:00
..
data_recipe Studio: add configurable model download location (#7274) 2026-07-23 01:34:38 -07:00
export Pin utf-8 on shipping-code text I/O instead of the operator locale (#7486) 2026-07-27 02:14:20 -07:00
inference Address review round 4: refcount concurrent guards, distrust proxy TCP 2026-07-29 01:49:45 -07:00
rag Pin utf-8 on shipping-code text I/O instead of the operator locale (#7486) 2026-07-27 02:14:20 -07:00
training [pre-commit.ci] auto fixes from pre-commit.com hooks 2026-07-29 06:47:23 +00:00
__init__.py Reduce and tighten code comments and docstrings repo-wide (#6095) 2026-06-08 23:09:51 -07:00
_torchao_stub.py Reduce and tighten code comments and docstrings repo-wide (#6095) 2026-06-08 23:09:51 -07:00
import_guards.py Studio: self-heal unsloth namespace shadows; clearer failed-load messages (#6532) 2026-06-21 22:43:31 -07:00
research_runs.py Studio: improve Deep Research synthesis (#7393) 2026-07-28 05:59:15 -07:00
tool_healing.py Studio: Inkling support fixes (#7153) 2026-07-15 11:22:38 -07:00