unsloth/studio
Daniel Han 8582ce3e9c
Fix studio chat crash on Mac: vendor check_signal_escape_patterns (#4431)
* Fix studio crash on Mac: vendor check_signal_escape_patterns from unsloth_zoo

Vendor the `check_signal_escape_patterns` function from
`unsloth_zoo.rl_environments` directly into `tools.py`. The function is
pure Python (only uses stdlib `ast`) and has zero GPU dependencies, but
importing it from unsloth_zoo triggers `unsloth_zoo.__init__` which calls
`get_device_type()` at module scope -- raising NotImplementedError on
Apple Silicon Macs.

By vendoring the code, the safety checks still run on all platforms
(Mac, Linux, Windows) without needing unsloth_zoo at all.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-03-18 09:10:13 -07:00
..
backend Fix studio chat crash on Mac: vendor check_signal_escape_patterns (#4431) 2026-03-18 09:10:13 -07:00
frontend Fix TypeScript build errors in studio frontend (#4429) 2026-03-18 08:44:38 -07:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
install_python_stack.py Combine studio setup fixes: frontend caching, venv isolation, Windows CPU support (#4413) 2026-03-18 03:52:25 -07: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 revert: always rebuild frontend, override caching with _NEED_FRONTEND_BUILD=true (#4427) 2026-03-18 07:37:53 -07:00
setup.sh revert: always rebuild frontend, override caching with _NEED_FRONTEND_BUILD=true (#4427) 2026-03-18 07:37:53 -07:00
Unsloth_Studio_Colab.ipynb Update Unsloth_Studio_Colab.ipynb 2026-03-17 15:42:38 -07:00