* 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> |
||
|---|---|---|
| .. | ||
| assets | ||
| auth | ||
| core | ||
| loggers | ||
| models | ||
| plugins | ||
| requirements | ||
| routes | ||
| state | ||
| tests | ||
| utils | ||
| __init__.py | ||
| colab.py | ||
| main.py | ||
| run.py | ||