mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-03 12:50:06 +06:00
Move source code inside a src subdirectory.
This prevents transformers from being importable simply because the CWD is the root of the git repository, while not being importable from other directories. That led to inconsistent behavior, especially in examples. Once you fetch this commit, in your dev environment, you must run: $ pip uninstall transformers $ pip install -e .
This commit is contained in:
parent
ced0a94204
commit
6be7cdda66
@ -97,9 +97,9 @@ jobs:
|
||||
- run: sudo pip install --editable .
|
||||
- run: sudo pip install torch tensorflow
|
||||
- run: sudo pip install black git+git://github.com/timothycrosley/isort.git@e63ae06ec7d70b06df9e528357650281a3d3ec22#egg=isort flake8
|
||||
- run: black --check --line-length 119 examples templates tests transformers utils
|
||||
- run: isort --check-only --recursive examples templates tests transformers utils
|
||||
- run: flake8 examples templates tests transformers utils
|
||||
- run: black --check --line-length 119 examples templates tests src utils
|
||||
- run: isort --check-only --recursive examples templates tests src utils
|
||||
- run: flake8 examples templates tests src utils
|
||||
check_repository_consistency:
|
||||
working_directory: ~/transformers
|
||||
docker:
|
||||
|
4
Makefile
4
Makefile
@ -1,5 +1,5 @@
|
||||
.PHONY: style
|
||||
|
||||
style:
|
||||
black --line-length 119 examples templates tests transformers utils
|
||||
isort --recursive examples templates tests transformers utils
|
||||
black --line-length 119 examples templates tests src utils
|
||||
isort --recursive examples templates tests src utils
|
||||
|
3
setup.py
3
setup.py
@ -56,7 +56,8 @@ setup(
|
||||
keywords="NLP deep learning transformer pytorch tensorflow BERT GPT GPT-2 google openai CMU",
|
||||
license="Apache",
|
||||
url="https://github.com/huggingface/transformers",
|
||||
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
|
||||
package_dir = {'': 'src'},
|
||||
packages=find_packages("src"),
|
||||
install_requires=[
|
||||
"numpy",
|
||||
"boto3",
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user