Browse Source

删除 transformers 中的依赖包字典

tags/v1.0.0alpha
x54-729 2 years ago
parent
commit
df0651baae
3 changed files with 2 additions and 98 deletions
  1. +2
    -2
      fastNLP/transformers/torch/deepspeed.py
  2. +0
    -20
      fastNLP/transformers/torch/dependency_versions_check.py
  3. +0
    -76
      fastNLP/transformers/torch/dependency_versions_table.py

+ 2
- 2
fastNLP/transformers/torch/deepspeed.py View File

@@ -22,7 +22,7 @@ import weakref
from copy import deepcopy from copy import deepcopy
from functools import partialmethod from functools import partialmethod


from .dependency_versions_check import dep_version_check
from .utils.versions import require_version
from fastNLP.envs.imports import _NEED_IMPORT_TORCH from fastNLP.envs.imports import _NEED_IMPORT_TORCH
from fastNLP.core.log import logger from fastNLP.core.log import logger


@@ -55,7 +55,7 @@ class HfDeepSpeedConfig:
# set global weakref object # set global weakref object
set_hf_deepspeed_config(self) set_hf_deepspeed_config(self)


dep_version_check("deepspeed")
require_version("deepspeed>=0.5.3")


if isinstance(config_file_or_dict, dict): if isinstance(config_file_or_dict, dict):
# Don't modify user's data should they want to reuse it (e.g. in tests), because once we # Don't modify user's data should they want to reuse it (e.g. in tests), because once we


+ 0
- 20
fastNLP/transformers/torch/dependency_versions_check.py View File

@@ -1,20 +0,0 @@
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import sys

from .dependency_versions_table import deps
from .utils.versions import require_version

def dep_version_check(pkg, hint=None):
require_version(deps[pkg], hint)

+ 0
- 76
fastNLP/transformers/torch/dependency_versions_table.py View File

@@ -1,76 +0,0 @@
# THIS FILE HAS BEEN AUTOGENERATED. To update:
# 1. modify the `_deps` dict in setup.py
# 2. run `make deps_table_update``
deps = {
"Pillow": "Pillow",
"black": "black==21.4b0",
"codecarbon": "codecarbon==1.2.0",
"cookiecutter": "cookiecutter==1.7.2",
"dataclasses": "dataclasses",
"datasets": "datasets",
"deepspeed": "deepspeed>=0.5.3",
"docutils": "docutils==0.16.0",
"fairscale": "fairscale>0.3",
"faiss-cpu": "faiss-cpu",
"fastapi": "fastapi",
"filelock": "filelock",
"flake8": "flake8>=3.8.3",
"flax": "flax>=0.3.4",
"fugashi": "fugashi>=1.0",
"GitPython": "GitPython<3.1.19",
"huggingface-hub": "huggingface-hub>=0.0.17",
"importlib_metadata": "importlib_metadata",
"ipadic": "ipadic>=1.0.0,<2.0",
"isort": "isort>=5.5.4",
"jax": "jax>=0.2.8",
"jaxlib": "jaxlib>=0.1.65",
"jieba": "jieba",
"keras2onnx": "keras2onnx",
"nltk": "nltk",
"numpy": "numpy>=1.17",
"onnxconverter-common": "onnxconverter-common",
"onnxruntime-tools": "onnxruntime-tools>=1.4.2",
"onnxruntime": "onnxruntime>=1.4.0",
"optuna": "optuna",
"optax": "optax>=0.0.8",
"packaging": "packaging>=20.0",
"parameterized": "parameterized",
"protobuf": "protobuf",
"psutil": "psutil",
"pyyaml": "pyyaml>=5.1",
"pydantic": "pydantic",
"pytest": "pytest",
"pytest-timeout": "pytest-timeout",
"pytest-xdist": "pytest-xdist",
"python": "python>=3.6.0",
"ray[tune]": "ray[tune]",
"recommonmark": "recommonmark",
"regex": "regex!=2019.12.17",
"requests": "requests",
"rouge-score": "rouge-score",
"sacrebleu": "sacrebleu>=1.4.12,<2.0.0",
"sacremoses": "sacremoses",
"sagemaker": "sagemaker>=2.31.0",
"scikit-learn": "scikit-learn",
"sentencepiece": "sentencepiece>=0.1.91,!=0.1.92",
"sigopt": "sigopt",
"soundfile": "soundfile",
"sphinx-copybutton": "sphinx-copybutton",
"sphinx-markdown-tables": "sphinx-markdown-tables",
"sphinx-rtd-theme": "sphinx-rtd-theme==0.4.3",
"sphinx": "sphinx==3.2.1",
"sphinxext-opengraph": "sphinxext-opengraph==0.4.1",
"sphinx-intl": "sphinx-intl",
"starlette": "starlette",
"tensorflow-cpu": "tensorflow-cpu>=2.3",
"tensorflow": "tensorflow>=2.3",
"timeout-decorator": "timeout-decorator",
"timm": "timm",
"tokenizers": "tokenizers>=0.10.1,<0.11",
"torch": "torch>=1.0",
"torchaudio": "torchaudio",
"tqdm": "tqdm>=4.27",
"unidic": "unidic>=1.0.2",
"unidic_lite": "unidic_lite>=1.0.7",
"uvicorn": "uvicorn",
}

Loading…
Cancel
Save