use correct deps for torchhub (#9552)
This commit is contained in:
8
.github/workflows/github-torch-hub.yml
vendored
8
.github/workflows/github-torch-hub.yml
vendored
@@ -1,6 +1,6 @@
|
|||||||
name: Torch hub integration
|
name: Torch hub integration
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- "*"
|
- "*"
|
||||||
@@ -32,8 +32,10 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
pip install --upgrade pip
|
pip install --upgrade pip
|
||||||
pip install torch
|
# install torch-hub specific dependencies
|
||||||
pip install numpy filelock protobuf requests tqdm regex sentencepiece sacremoses tokenizers==0.9.4 packaging importlib_metadata
|
pip install -e git+https://github.com/huggingface/transformers.git#egg=transformers[torchhub]
|
||||||
|
# no longer needed
|
||||||
|
pip uninstall -y transformers
|
||||||
|
|
||||||
- name: Torch hub list
|
- name: Torch hub list
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -229,6 +229,8 @@ extras["dev"] = (
|
|||||||
+ extras["modelcreation"]
|
+ extras["modelcreation"]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
extras["torchhub"] = deps_list("filelock", "importlib_metadata", "numpy", "packaging", "protobuf", "regex",
|
||||||
|
"requests", "sacremoses", "sentencepiece", "torch", "tokenizers", "tqdm")
|
||||||
|
|
||||||
# when modifying the following list, make sure to update src/transformers/dependency_versions_check.py
|
# when modifying the following list, make sure to update src/transformers/dependency_versions_check.py
|
||||||
install_requires = [
|
install_requires = [
|
||||||
|
|||||||
Reference in New Issue
Block a user