Commit f274968
committed
fix: make transformers import optional
The 'transformers' library is not listed in requirements.txt but was
imported at the top level in _utils.py, causing ImportError in environments
where it is not installed (e.g., CI).
This commit wraps the import in a try-except block to make it optional,
mirroring the logic in TokenizerWrapper.
Signed-off-by: majiayu000 <1835304752@qq.com>1 parent c026478 commit f274968
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
| |||
0 commit comments