mirror of
https://github.com/nod-ai/SHARK-Studio.git
synced 2026-01-09 22:07:55 -05:00
Add tokenizers to requirements.txt (#1790)
* Add tokenizers to requirements and pin version * Update process_skipfiles.py
This commit is contained in:
@@ -6,15 +6,24 @@ from distutils.sysconfig import get_python_lib
|
|||||||
import fileinput
|
import fileinput
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
# Temorary workaround for transformers/__init__.py.
|
# Temporary workaround for transformers/__init__.py.
|
||||||
path_to_tranformers_hook = Path(
|
path_to_stdhooks = Path(
|
||||||
get_python_lib()
|
get_python_lib() + "/_pyinstaller_hooks_contrib/hooks/stdhooks"
|
||||||
+ "/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-transformers.py"
|
|
||||||
)
|
)
|
||||||
if path_to_tranformers_hook.is_file():
|
path_to_transformers_hook = Path(
|
||||||
|
str(path_to_stdhooks) + "hook-transformers.py"
|
||||||
|
)
|
||||||
|
if path_to_transformers_hook.is_file():
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
with open(path_to_tranformers_hook, "w") as f:
|
if not path_to_stdhooks.is_dir():
|
||||||
|
import os
|
||||||
|
|
||||||
|
print(
|
||||||
|
f"Path to pyinstaller stdhooks not found. Please check your pyinstaller packages at {path_to_stdhooks}."
|
||||||
|
)
|
||||||
|
os.mkdir(path_to_stdhooks)
|
||||||
|
with open(path_to_transformers_hook, "w") as f:
|
||||||
f.write("module_collection_mode = 'pyz+py'")
|
f.write("module_collection_mode = 'pyz+py'")
|
||||||
|
|
||||||
path_to_skipfiles = Path(get_python_lib() + "/torch/_dynamo/skipfiles.py")
|
path_to_skipfiles = Path(get_python_lib() + "/torch/_dynamo/skipfiles.py")
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ Pillow
|
|||||||
parameterized
|
parameterized
|
||||||
|
|
||||||
# Add transformers, diffusers and scipy since it most commonly used
|
# Add transformers, diffusers and scipy since it most commonly used
|
||||||
|
tokenizers==0.13.3
|
||||||
transformers
|
transformers
|
||||||
diffusers
|
diffusers
|
||||||
#accelerate is now required for diffusers import from ckpt.
|
#accelerate is now required for diffusers import from ckpt.
|
||||||
|
|||||||
Reference in New Issue
Block a user