Unverified Commit edd3721c authored by Stas Bekman's avatar Stas Bekman Committed by GitHub
Browse files

update/add setup targets (#8076)

parent 55bc0c59
...@@ -44,6 +44,7 @@ To create the package for pypi. ...@@ -44,6 +44,7 @@ To create the package for pypi.
9. Update README.md to redirect to correct documentation. 9. Update README.md to redirect to correct documentation.
""" """
import os
import shutil import shutil
from pathlib import Path from pathlib import Path
...@@ -87,11 +88,15 @@ extras["tf-cpu"] = [ ...@@ -87,11 +88,15 @@ extras["tf-cpu"] = [
# "keras2onnx @ git+git://github.com/onnx/keras-onnx.git@cbdc75cb950b16db7f0a67be96a278f8d2953b48#egg=keras2onnx", # "keras2onnx @ git+git://github.com/onnx/keras-onnx.git@cbdc75cb950b16db7f0a67be96a278f8d2953b48#egg=keras2onnx",
] ]
extras["torch"] = ["torch>=1.0"] extras["torch"] = ["torch>=1.0"]
extras["flax"] = ["jaxlib==0.1.55", "jax>=0.2.0", "flax==0.2.2"] extras["flax"] = ["jaxlib==0.1.55", "jax>=0.2.0", "flax==0.2.2"]
if os.name == "nt": # windows
extras["flax"] = [] # jax is not supported on windows
extras["tokenizers"] = ["tokenizers==0.9.2"]
extras["onnxruntime"] = ["onnxruntime>=1.4.0", "onnxruntime-tools>=1.4.2"] extras["onnxruntime"] = ["onnxruntime>=1.4.0", "onnxruntime-tools>=1.4.2"]
extras["serving"] = ["pydantic", "uvicorn", "fastapi", "starlette"] extras["serving"] = ["pydantic", "uvicorn", "fastapi", "starlette"]
extras["all"] = extras["serving"] + ["tensorflow", "torch"]
extras["sentencepiece"] = ["sentencepiece!=0.1.92"] extras["sentencepiece"] = ["sentencepiece!=0.1.92"]
extras["retrieval"] = ["faiss-cpu", "datasets"] extras["retrieval"] = ["faiss-cpu", "datasets"]
...@@ -99,7 +104,12 @@ extras["testing"] = ["pytest", "pytest-xdist", "timeout-decorator", "parameteriz ...@@ -99,7 +104,12 @@ extras["testing"] = ["pytest", "pytest-xdist", "timeout-decorator", "parameteriz
# sphinx-rtd-theme==0.5.0 introduced big changes in the style. # sphinx-rtd-theme==0.5.0 introduced big changes in the style.
extras["docs"] = ["recommonmark", "sphinx", "sphinx-markdown-tables", "sphinx-rtd-theme==0.4.3", "sphinx-copybutton"] extras["docs"] = ["recommonmark", "sphinx", "sphinx-markdown-tables", "sphinx-rtd-theme==0.4.3", "sphinx-copybutton"]
extras["quality"] = ["black >= 20.8b1", "isort >= 5.5.4", "flake8 >= 3.8.3"] extras["quality"] = ["black >= 20.8b1", "isort >= 5.5.4", "flake8 >= 3.8.3"]
extras["dev"] = extras["testing"] + extras["quality"] + extras["ja"] + ["scikit-learn", "tensorflow", "torch", "sentencepiece!=0.1.92"]
extras["all"] = extras["tf"] + extras["torch"] + extras["flax"] + extras["sentencepiece"] + extras["tokenizers"]
extras["dev"] = extras["all"] + extras["testing"] + extras["quality"] + extras["ja"] + extras["docs"] + extras["sklearn"]
setup( setup(
name="transformers", name="transformers",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment