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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user