text stringlengths 0 9.36M |
|---|
You should now have a /dist directory with both .whl and .tar.gz source versions. |
8. Check that everything looks correct by uploading the package to the pypi test server: |
twine upload dist/* -r pypitest |
(pypi suggest using twine as other methods upload files via plaintext.) |
You may have to specify the repository url, use the following command then: |
twine upload dist/* -r pypitest --repository-url=https://test.pypi.org/legacy/ |
Check that you can install it in a virtualenv by running: |
pip install -i https://testpypi.python.org/pypi transformers |
Check you can run the following commands: |
python -c "from transformers import pipeline; classifier = pipeline('text-classification'); print(classifier('What a nice release'))" |
python -c "from transformers import *" |
9. Upload the final version to actual pypi: |
twine upload dist/* -r pypi |
10. Copy the release notes from RELEASE.md to the tag in github once everything is looking hunky-dory. |
11. Run `make post-release` then run `make fix-copies`. If you were on a branch for the release, |
you need to go back to main before executing this. |
""" |
import os |
import re |
import shutil |
from distutils.core import Command |
from pathlib import Path |
from setuptools import find_packages, setup |
# Remove stale transformers.egg-info directory to avoid https://github.com/pypa/pip/issues/5466 |
stale_egg_info = Path(__file__).parent / "transformers.egg-info" |
if stale_egg_info.exists(): |
print( |
( |
"Warning: {} exists.\n\n" |
"If you recently updated transformers to 3.0 or later, this is expected,\n" |
"but it may prevent transformers from installing in editable mode.\n\n" |
"This directory is automatically generated by Python's packaging tools.\n" |
"I will remove it now.\n\n" |
"See https://github.com/pypa/pip/issues/5466 for details.\n" |
).format(stale_egg_info) |
) |
shutil.rmtree(stale_egg_info) |
# IMPORTANT: |
# 1. all dependencies should be listed here with their version requirements if any |
# 2. once modified, run: `make deps_table_update` to update src/transformers/dependency_versions_table.py |
_deps = [ |
"Pillow", |
"accelerate>=0.10.0", |
"black==22.3", # after updating to black 2023, also update Python version in pyproject.toml to 3.7 |
"codecarbon==1.2.0", |
"cookiecutter==1.7.3", |
"dataclasses", |
"datasets!=2.5.0", |
"decord==0.6.0", |
"deepspeed>=0.6.5", |
"dill<0.3.5", |
"docutils==0.16.0", |
"evaluate>=0.2.0", |
"fairscale>0.3", |
"faiss-cpu", |
"fastapi", |
"filelock", |
"flake8>=3.8.3", |
"flax>=0.4.1", |
"ftfy", |
"fugashi>=1.0", |
"GitPython<3.1.19", |
"hf-doc-builder>=0.3.0", |
"huggingface-hub>=0.11.0,<1.0", |
"importlib_metadata", |
"ipadic>=1.0.0,<2.0", |
"isort>=5.5.4", |
"jax>=0.2.8,!=0.3.2,<=0.3.6", |
"jaxlib>=0.1.65,<=0.3.6", |
"jieba", |
"kenlm", |
"keras-nlp>=0.3.1", |
"nltk", |
"natten>=0.14.4", |
"numpy>=1.17", |
"onnxconverter-common", |
"onnxruntime-tools>=1.4.2", |
"onnxruntime>=1.4.0", |
"optuna", |
"optax>=0.0.8", |
"packaging>=20.0", |
"parameterized", |
"phonemizer", |
"protobuf<=3.20.2", |
"psutil", |
"pyyaml>=5.1", |
"pydantic", |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.