unsloth/studio/backend
Roland Tannous 737017a511 fix(studio): lazy-import extract_model_size_b in llama_cpp to fix transformers 5.x version switch
PR #4769 (e4d14992) added a module-level `from utils.models import
extract_model_size_b` to llama_cpp.py.  Since core/inference/__init__.py
eagerly imports llama_cpp, the spawn subprocess now hits:

  core.inference.__init__  →  llama_cpp  →  utils.models  →
  model_config (line 8: `from transformers import AutoConfig`)

…before _activate_transformers_version() has a chance to prepend
.venv_t5/ to sys.path.  Python caches transformers 4.57.6 in
sys.modules, and no subsequent sys.path change can override it.

Fix: replace the eager import with a thin wrapper that defers the
import to first call.  This breaks the transitive chain so
transformers is not loaded until after version activation.
2026-04-02 21:42:56 +00:00
..
assets fix(studio): correct default weight_decay and learning rate (#4695) 2026-03-31 13:50:25 +04:00
auth fix: remove old comments (#4292) 2026-03-14 16:50:13 +04:00
core fix(studio): lazy-import extract_model_size_b in llama_cpp to fix transformers 5.x version switch 2026-04-02 21:42:56 +00:00
loggers Final cleanup 2026-03-12 18:28:04 +00:00
models fix(studio): allow context length slider to reach model's native limit (#4746) 2026-04-01 06:12:52 -07:00
plugins Bump Data Designer to 0.5.4 (removes litellm dependency) (#4569) 2026-03-25 02:01:43 -07:00
requirements Pin transformers and huggingface-hub in main Studio venv (#4788) 2026-04-02 09:21:30 -07:00
routes fix(studio): improve tool-calling re-prompt for small models (#4783) 2026-04-02 08:59:02 -07:00
state Final cleanup 2026-03-12 18:28:04 +00:00
storage feat: custom scan folders for GGUF model discovery (#4723) 2026-03-31 06:40:31 -07:00
tests Tests for architecture-aware KV cache estimation (#4760) 2026-04-01 06:13:37 -07:00
utils Pin Gemma-4 transformers requirement to 5.5.0 stable (#4784) 2026-04-02 08:59:21 -07:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
_platform_compat.py Fix Studio crash on Anaconda/conda-forge Python (#4484) 2026-03-22 05:36:55 -07:00
colab.py Allow install_python_stack to run on Colab (#4633) 2026-03-27 00:29:27 +04:00
main.py studio: Polish Windows installer/setup logs (#4736) 2026-03-31 23:12:42 -07:00
run.py fix(studio): avoid UnicodeEncodeError on Windows cp1252 consoles (#4699) 2026-03-30 06:40:47 -07:00
startup_banner.py studio: unify Windows installer/setup logging style, verbosity controls, and startup messaging (#4651) 2026-03-30 00:53:23 -07:00