Skip to content

Commit eaf9e29

Browse files
committed
fix requirements
1 parent 97ca472 commit eaf9e29

File tree

5 files changed

+67
-38
lines changed

5 files changed

+67
-38
lines changed

README.md

+27-12
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,11 @@ conda create -n deepke python=3.8
155155
conda activate deepke
156156
```
157157

158-
1. Install *DeepKE* with source code (**Recommended!!!**)
158+
1. Install *DeepKE* with source code
159159

160160
```bash
161+
pip install -r requirements.txt
162+
161163
python setup.py install
162164

163165
python setup.py develop
@@ -241,18 +243,31 @@ The remaining steps are the same as **Step 3 and onwards** in **Manual Environme
241243
### DeepKE
242244
> python == 3.8
243245
244-
- torch == 1.5
245-
- hydra-core == 1.0.6
246-
- tensorboard == 2.4.1
247-
- matplotlib == 3.4.1
248-
- transformers == 3.4.0
249-
- jieba == 0.42.1
250-
- scikit-learn == 0.24.1
251-
- seqeval == 1.2.2
252-
- tqdm == 4.60.0
246+
- torch>=1.5,<=1.11
247+
- hydra-core==1.0.6
248+
- tensorboard==2.4.1
249+
- matplotlib==3.4.1
250+
- transformers==4.26.0
251+
- jieba==0.42.1
252+
- scikit-learn==0.24.1
253+
- seqeval==1.2.2
253254
- opt-einsum==3.3.0
254255
- wandb==0.12.7
255-
- ujson
256+
- ujson==5.6.0
257+
- huggingface_hub==0.11.0
258+
- tensorboardX==2.5.1
259+
- nltk==3.8
260+
- protobuf==3.20.1
261+
- numpy==1.21.0
262+
- ipdb==0.13.11
263+
- pytorch-crf==0.7.2
264+
- tqdm==4.66.1
265+
- openai==0.28.0
266+
- Jinja2==3.1.2
267+
- datasets==2.13.2
268+
- pyhocon==0.3.60
269+
270+
<br>
256271

257272
## Introduction of Three Functions
258273

@@ -646,7 +661,7 @@ This toolkit provides many `Jupyter Notebook` and `Google Colab` tutorials. User
646661
647662
4.The old version of *DeepKE* is in the [deepke-v1.0](https://github.com/zjunlp/DeepKE/tree/deepke-v1.0) branch. Users can change the branch to use the old version. The old version has been totally transfered to the standard relation extraction ([example/re/standard](https://github.com/zjunlp/DeepKE/blob/main/example/re/standard/README.md)).
648663
649-
5.It's recommended to install *DeepKE* with source codes. Because user may meet some problems in Windows system with 'pip',and the source code modification will not work,see[issue](https://github.com/zjunlp/DeepKE/issues/117)
664+
5.If you want to modify the source code, it's recommended to install *DeepKE* with source codes. If not, the modification will not work. See [issue](https://github.com/zjunlp/DeepKE/issues/117)
650665

651666
6.More related low-resource knowledge extraction works can be found in [Knowledge Extraction in Low-Resource Scenarios: Survey and Perspective](https://arxiv.org/pdf/2202.08063.pdf).
652667

README_CN.md

+30-16
Original file line numberDiff line numberDiff line change
@@ -144,20 +144,22 @@ pip install -r requirements.txt
144144

145145
**Step 2**:使用anaconda创建虚拟环境,进入虚拟环境(提供[Dockerfile](https://github.com/zjunlp/DeepKE/tree/main/docker)源码和[教程](https://github.com/zjunlp/DeepKE/issues/320)可自行创建镜像;可参考[备注(常见问题)](#备注常见问题)使用镜像加速)
146146

147-
```
147+
```bash
148148
conda create -n deepke python=3.8
149149

150150
conda activate deepke
151151
```
152152
1) 基于pip安装,直接使用
153153

154-
```
154+
```bash
155155
pip install deepke
156156
```
157157

158-
2) 基于源码安装 (**强烈建议使用源码安装**)
158+
2) 基于源码安装
159+
160+
```bash
161+
pip install -r requirements.txt
159162

160-
```
161163
python setup.py install
162164

163165
python setup.py develop
@@ -233,17 +235,29 @@ docker run -it zjunlp/deepke:v1 /bin/bash
233235

234236
> python == 3.8
235237
236-
- torch == 1.5
237-
- hydra-core == 1.0.6
238-
- tensorboard == 2.4.1
239-
- matplotlib == 3.4.1
240-
- transformers == 3.4.0
241-
- jieba == 0.42.1
242-
- scikit-learn == 0.24.1
243-
- seqeval == 1.2.2
244-
- tqdm == 4.60.0
238+
- torch>=1.5,<=1.11
239+
- hydra-core==1.0.6
240+
- tensorboard==2.4.1
241+
- matplotlib==3.4.1
242+
- transformers==4.26.0
243+
- jieba==0.42.1
244+
- scikit-learn==0.24.1
245+
- seqeval==1.2.2
245246
- opt-einsum==3.3.0
246-
- ujson
247+
- wandb==0.12.7
248+
- ujson==5.6.0
249+
- huggingface_hub==0.11.0
250+
- tensorboardX==2.5.1
251+
- nltk==3.8
252+
- protobuf==3.20.1
253+
- numpy==1.21.0
254+
- ipdb==0.13.11
255+
- pytorch-crf==0.7.2
256+
- tqdm==4.66.1
257+
- openai==0.28.0
258+
- Jinja2==3.1.2
259+
- datasets==2.13.2
260+
- pyhocon==0.3.60
247261

248262
<br>
249263

@@ -633,9 +647,9 @@ docker run -it zjunlp/deepke:v1 /bin/bash
633647

634648
5.DeepKE老版本位于[deepke-v1.0](https://github.com/zjunlp/DeepKE/tree/deepke-v1.0)分支,用户可切换分支使用老版本,老版本的能力已全部迁移到标准设定关系抽取([example/re/standard](https://github.com/zjunlp/DeepKE/blob/main/example/re/standard/README.md))中。
635649

636-
6.推荐使用`python setup.py install`方式安装*DeepKE*,如未使用该方式安装,源码修改部分不会生效,见[问题](https://github.com/zjunlp/DeepKE/issues/117)
650+
6.如果您需要在源码的基础上进行修改,建议使用`python setup.py install`方式安装*DeepKE*如未使用该方式安装,源码修改部分不会生效见[问题](https://github.com/zjunlp/DeepKE/issues/117)
637651

638-
7.更多的低资源抽取工作可查阅论文 [Knowledge Extraction in Low-Resource Scenarios: Survey and Perspective](https://arxiv.org/pdf/2202.08063.pdf).
652+
7.更多的低资源抽取工作可查阅论文 [Knowledge Extraction in Low-Resource Scenarios: Survey and Perspective](https://arxiv.org/pdf/2202.08063.pdf)
639653

640654
8.确保使用requirements.txt中对应的各依赖包的版本。
641655

docker/setup_docker.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='deepke', # 打包后的包文件名
5-
version='2.2.1', #版本号
5+
version='2.2.7', #版本号
66
keywords=["pip", "RE","NER","AE"], # 关键字
77
description='DeepKE is a knowledge extraction toolkit for knowledge graph construction supporting low-resource, document-level and multimodal scenarios for entity, relation and attribute extraction.', # 说明
88
license="MIT", # 许可

requirements.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ transformers==4.26.0
66
jieba==0.42.1
77
scikit-learn==0.24.1
88
seqeval==1.2.2
9-
tqdm
109
opt-einsum==3.3.0
1110
wandb==0.12.7
1211
ujson==5.6.0
@@ -17,7 +16,8 @@ protobuf==3.20.1
1716
numpy==1.21.0
1817
ipdb==0.13.11
1918
pytorch-crf==0.7.2
20-
openai
21-
Jinja2
22-
datasets
23-
pyhocon
19+
tqdm==4.66.1
20+
openai==0.28.0
21+
Jinja2==3.1.2
22+
datasets==2.13.2
23+
pyhocon==0.3.60

setup.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
from setuptools import setup, find_packages
22

33

4-
with open("requirements.txt") as requirements_file:
5-
requirements = requirements_file.read().splitlines()
4+
# with open("requirements.txt") as requirements_file:
5+
# requirements = requirements_file.read().splitlines()
66

77
setup(
88
name='deepke', # 打包后的包文件名
9-
version='2.2.6', #版本号
9+
version='2.2.7', #版本号
1010
keywords=["pip", "RE","NER","AE"], # 关键字
1111
description='DeepKE is a knowledge extraction toolkit for knowledge graph construction supporting low-resource, document-level and multimodal scenarios for entity, relation and attribute extraction.', # 说明
1212
license="MIT", # 许可
@@ -17,7 +17,7 @@
1717
platforms="any",
1818
package_dir={"": "src"},
1919
packages=find_packages("src"),
20-
install_requires=requirements,
20+
# install_requires=requirements,
2121
classifiers=[
2222
"Programming Language :: Python :: 3",
2323
"Operating System :: OS Independent",

0 commit comments

Comments
 (0)