A Deep Learning Based Knowledge Extraction Toolkit for Knowledge Base Population

Overview

Documentation PyPI GitHub Documentation Open In Colab

English | 简体中文

A Deep Learning Based Knowledge Extraction Toolkit
for Knowledge Base Population

DeepKE is a knowledge extraction toolkit supporting low-resource and document-level scenarios for entity, relation and attribute extraction. We provide comprehensive documents, Google Colab tutorials, and online demo for beginners.


Table of Contents


What's New

Jan, 2022

Dec, 2021

  • We have added dockerfile to create the enviroment automatically.

Nov, 2021

  • The demo of DeepKE, supporting real-time extration without deploying and training, has been released.
  • The documentation of DeepKE, containing the details of DeepKE such as source codes and datasets, has been released.

Oct, 2021

  • pip install deepke
  • The codes of deepke-v2.0 have been released.

August, 2020

  • The codes of deepke-v1.0 have been released.

Prediction Demo

There is a demonstration of prediction.


Model Framework

  • DeepKE contains a unified framework for named entity recognition, relation extraction and attribute extraction, the three knowledge extraction functions.
  • Each task can be implemented in different scenarios. For example, we can achieve relation extraction in standard, low-resource (few-shot) and document-level settings.
  • Each application scenario comprises of three components: Data including Tokenizer, Preprocessor and Loader, Model including Module, Encoder and Forwarder, Core including Training, Evaluation and Prediction.

Quick Start

DeepKE supports pip install deepke.
Take the fully supervised relation extraction for example.

Step1 Download the basic code

git clone https://github.com/zjunlp/DeepKE.git

Step2 Create a virtual environment using Anaconda and enter it.

We also provide dockerfile source code, which is located in the docker folder, to help users create their own mirrors.

conda create -n deepke python=3.8

conda activate deepke
  1. Install DeepKE with source code

    python setup.py install
    
    python setup.py develop
  2. Install DeepKE with pip

    pip install deepke

Step3 Enter the task directory

cd DeepKE/example/re/standard

Step4 Download the dataset

wget 120.27.214.45/Data/re/standard/data.tar.gz

tar -xzvf data.tar.gz

Step5 Training (Parameters for training can be changed in the conf folder)

We support visual parameter tuning by using wandb.

python run.py

Step6 Prediction (Parameters for prediction can be changed in the conf folder)

Modify the path of the trained model in predict.yaml.

python predict.py

Requirements

python == 3.8

  • torch == 1.5
  • hydra-core == 1.0.6
  • tensorboard == 2.4.1
  • matplotlib == 3.4.1
  • transformers == 3.4.0
  • jieba == 0.42.1
  • scikit-learn == 0.24.1
  • pytorch-transformers == 1.2.0
  • seqeval == 1.2.2
  • tqdm == 4.60.0
  • opt-einsum==3.3.0
  • wandb==0.12.7
  • ujson

Introduction of Three Functions

1. Named Entity Recognition

  • Named entity recognition seeks to locate and classify named entities mentioned in unstructured text into pre-defined categories such as person names, organizations, locations, organizations, etc.

  • The data is stored in .txt files. Some instances as following:

    Sentence Person Location Organization
    本报北京9月4日讯记者杨涌报道:部分省区人民日报宣传发行工作座谈会9月3日在4日在京举行。 杨涌 北京 人民日报
    《红楼梦》是中央电视台和中国电视剧制作中心根据中国古典文学名著《红楼梦》摄制于1987年的一部古装连续剧,由王扶林导演,周汝昌、王蒙、周岭等多位红学家参与制作。 王扶林,周汝昌,王蒙,周岭 中国 中央电视台,中国电视剧制作中心
    秦始皇兵马俑位于陕西省西安市,1961年被国务院公布为第一批全国重点文物保护单位,是世界八大奇迹之一。 秦始皇 陕西省,西安市 国务院
  • Read the detailed process in specific README

    • STANDARD (Fully Supervised)

      Step1 Enter DeepKE/example/ner/standard. Download the dataset.

      wget 120.27.214.45/Data/ner/standard/data.tar.gz
      
      tar -xzvf data.tar.gz

      Step2 Training

      The dataset and parameters can be customized in the data folder and conf folder respectively.

      python run.py

      Step3 Prediction

      python predict.py
    • FEW-SHOT

      Step1 Enter DeepKE/example/ner/few-shot. Download the dataset.

      wget 120.27.214.45/Data/ner/few_shot/data.tar.gz
      
      tar -xzvf data.tar.gz

      Step2 Training in the low-resouce setting

      The directory where the model is loaded and saved and the configuration parameters can be cusomized in the conf folder.

      python run.py +train=few_shot

      Users can modify load_path in conf/train/few_shot.yaml to use existing loaded model.

      Step3 Add - predict to conf/config.yaml, modify loda_path as the model path and write_path as the path where the predicted results are saved in conf/predict.yaml, and then run python predict.py

      python predict.py

2. Relation Extraction

  • Relationship extraction is the task of extracting semantic relations between entities from a unstructured text.

  • The data is stored in .csv files. Some instances as following:

    Sentence Relation Head Head_offset Tail Tail_offset
    《岳父也是爹》是王军执导的电视剧,由马恩然、范明主演。 导演 岳父也是爹 1 王军 8
    《九玄珠》是在纵横中文网连载的一部小说,作者是龙马。 连载网站 九玄珠 1 纵横中文网 7
    提起杭州的美景,西湖总是第一个映入脑海的词语。 所在城市 西湖 8 杭州 2
  • Read the detailed process in specific README

    • STANDARD (Fully Supervised)

      Step1 Enter the DeepKE/example/re/standard folder. Download the dataset.

      wget 120.27.214.45/Data/re/standard/data.tar.gz
      
      tar -xzvf data.tar.gz

      Step2 Training

      The dataset and parameters can be customized in the data folder and conf folder respectively.

      python run.py

      Step3 Prediction

      python predict.py
    • FEW-SHOT

      Step1 Enter DeepKE/example/re/few-shot. Download the dataset.

      wget 120.27.214.45/Data/re/few_shot/data.tar.gz
      
      tar -xzvf data.tar.gz

      Step 2 Training

      • The dataset and parameters can be customized in the data folder and conf folder respectively.
      • Start with the model trained last time: modify train_from_saved_model in conf/train.yamlas the path where the model trained last time was saved. And the path saving logs generated in training can be customized by log_dir.
      python run.py

      Step3 Prediction

      python predict.py
    • DOCUMENT

      Step1 Enter DeepKE/example/re/document. Download the dataset.

      wget 120.27.214.45/Data/re/document/data.tar.gz
      
      tar -xzvf data.tar.gz

      Step2 Training

      • The dataset and parameters can be customized in the data folder and conf folder respectively.
      • Start with the model trained last time: modify train_from_saved_model in conf/train.yamlas the path where the model trained last time was saved. And the path saving logs generated in training can be customized by log_dir.
      python run.py

      Step3 Prediction

      python predict.py

3. Attribute Extraction

  • Attribute extraction is to extract attributes for entities in a unstructed text.

  • The data is stored in .csv files. Some instances as following:

    Sentence Att Ent Ent_offset Val Val_offset
    张冬梅,女,汉族,1968年2月生,河南淇县人 民族 张冬梅 0 汉族 6
    诸葛亮,字孔明,三国时期杰出的军事家、文学家、发明家。 朝代 诸葛亮 0 三国时期 8
    2014年10月1日许鞍华执导的电影《黄金时代》上映 上映时间 黄金时代 19 2014年10月1日 0
  • Read the detailed process in specific README

    • STANDARD (Fully Supervised)

      Step1 Enter the DeepKE/example/ae/standard folder. Download the dataset.

      wget 120.27.214.45/Data/ae/standard/data.tar.gz
      
      tar -xzvf data.tar.gz

      Step2 Training

      The dataset and parameters can be customized in the data folder and conf folder respectively.

      python run.py

      Step3 Prediction

      python predict.py

Notebook Tutorial

This toolkit provides many Jupyter Notebook and Google Colab tutorials. Users can study DeepKE with them.


Tips

  1. Using nearest mirror, like THU in China, will speed up the installation of Anaconda.
  2. Using nearest mirror, like aliyun in China, will speed up pip install XXX.
  3. When encountering ModuleNotFoundError: No module named 'past',run pip install future .
  4. It's slow to install the pretrained language models online. Recommend download pretrained models before use and save them in the pretrained folder. Read README.md in every task directory to check the specific requirement for saving pretrained models.
  5. The old version of DeepKE is in the 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).
  6. It's recommended to install DeepKE with source codes. Because user may meet some problems in Windows system with 'pip'.

To do

In next version, we plan to add multi-modality knowledge extraction to the toolkit.

Meanwhile, we will offer long-term maintenance to fix bugs, solve issues and meet new requests. So if you have any problems, please put issues to us.


Citation

Please cite our paper if you use DeepKE in your work

@article{Zhang_DeepKE_A_Deep_2022,
author = {Zhang, Ningyu and Xu, Xin and Tao, Liankuan and Yu, Haiyang and Ye, Hongbin and Xie, Xin and Chen, Xiang and Li, Zhoubo and Li, Lei and Liang, Xiaozhuan and Yao, Yunzhi and Deng, Shumin and Zhang, Zhenru and Tan, Chuanqi and Huang, Fei and Zheng, Guozhou and Chen, Huajun},
journal = {http://arxiv.org/abs/2201.03335},
title = {{DeepKE: A Deep Learning Based Knowledge Extraction Toolkit for Knowledge Base Population}},
year = {2022}
}

Developers

Zhejiang University: Ningyu Zhang, Liankuan Tao, Haiyang Yu, Xiang Chen, Xin Xu, Xi Tian, Lei Li, Zhoubo Li, Shumin Deng, Yunzhi Yao, Hongbin Ye, Xin Xie, Guozhou Zheng, Huajun Chen

DAMO Academy: Zhenru Zhang, Chuanqi Tan, Fei Huang

Comments
  • NER 任务中出现KeyError报错

    NER 任务中出现KeyError报错

    Describe the question

    A clear and concise description of what the question is. NER 任务中,换成自己的标注数据集进行训练时会出现KeyError报错:KeyError: 'B-Disease'。 我已经在get_labels函数中添加了训练集中的标注标签,还是未能解决此问题,希望大佬给予帮助。

    Environment (please complete the following information):

    • OS: [e.g. mac / window]
    • Python Version [e.g. 3.6] Linux python 3.8

    Screenshots

    If applicable, add screenshots to help explain your problem. image

    Additional context

    Add any other context about the problem here.

    question 
    opened by ZZQ908268856 18
  • 运行/data/qinglong/knowledgeGraph/DeepKE/example/ner/standard中的run_bert.py对英文数据集conll2003进行实体识别出现错误

    运行/data/qinglong/knowledgeGraph/DeepKE/example/ner/standard中的run_bert.py对英文数据集conll2003进行实体识别出现错误

    报错信息如下 Traceback (most recent call last): File "/data/qinglong/knowledgeGraph/DeepKE/example/ner/standard/run_bert.py", line 135, in main train_features = convert_examples_to_features(train_examples, label_list, cfg.max_seq_length, tokenizer) File "/home/qinglong/.conda/envs/deepke/lib/python3.8/site-packages/deepke/name_entity_re/standard/tools/preprocess.py", line 92, in convert_examples_to_features label_ids.append(label_map[labels[i]]) KeyError: 'EU\tB-ORG' 经debug发现examples中的每一个样本数据中的 text_a = 'EU B-ORG rejects O German B-MISC call O to O boycott O British B-MISC lamb O . O ' labellist = ['EU\tB-ORG', 'rejects\tO', 'German\tB-MISC', 'call\tO', 'to\tO', 'boycott\tO', 'British\tB-MISC', 'lamb\tO', '.\tO'] textlist = ['EU\tB-ORG\n', 'rejects\tO\n', 'German\tB-MISC\n', 'call\tO\n', 'to\tO\n', 'boycott\tO\n', 'British\tB-MISC\n', 'lamb\tO\n', '.\tO\n'] 而中文数据集中的 examples 中的 text_a ='海 钓 比 赛 地 点 在 厦 门 与 金 门 之 间 的 海 域 。'

    bug 
    opened by qinglongheu 16
  • Cnschema自带的关系抽取模型报错

    Cnschema自带的关系抽取模型报错

    Traceback (most recent call last): File "D:/MyProject/python/DeepKE-main/example/re/standard/predict.py", line 120, in main model.load(cfg.fp, device=device) File "D:\MyProject\python\DeepKE-main\src\deepke\relation_extraction\standard\models\BasicModule.py", line 19, in load self.load_state_dict(torch.load(path, map_location=device)) File "F:\Anaconda3\envs\DeepKE-main\lib\site-packages\torch\nn\modules\module.py", line 1482, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(RuntimeError: Error(s) in loading state_dict for PCNN: Missing key(s) in state_dict: "embedding.wordEmbed.weight", "embedding.entityPosEmbed.weight", "embedding.attribute_keyPosEmbed.weight", "embedding.layer_norm.weight", "embedding.layer_norm.bias", "cnn.convs.0.weight", "cnn.convs.1.weight", "cnn.convs.2.weight", "cnn.activations.prelu.weight", "fc1.weight", "fc1.bias", "fc2.weight", "fc2.bias". Unexpected key(s) in state_dict: "bert.embeddings.position_ids", "bert.embeddings.word_embeddings.weight", "bert.embeddings.position_embeddings.weight", "bert.embeddings.token_type_embeddings.weight", "bert.embeddings.LayerNorm.weight", "bert.embeddings.LayerNorm.bias", "bert.encoder.layer.0.attention.self.query.weight", "bert.encoder.layer.0.attention.self.query.bias", "bert.encoder.layer.0.attention.self.key.weight", "bert.encoder.layer.0.attention.self.key.bias", "bert.encoder.layer.0.attention.self.value.weight", "bert.encoder.layer.0.attention.self.value.bias", "bert.encoder.layer.0.attention.output.dense.weight", "bert.encoder.layer.0.attention.output.dense.bias", "bert.encoder.layer.0.attention.output.LayerNorm.weight", "bert.encoder.layer.0.attention.output.LayerNorm.bias", "bert.encoder.layer.0.intermediate.dense.weight", "bert.encoder.layer.0.intermediate.dense.bias", "bert.encoder.layer.0.output.dense.weight", "bert.encoder.layer.0.output.dense.bias", "bert.encoder.layer.0.output.LayerNorm.weight", "bert.encoder.layer.0.output.LayerNorm.bias", "bert.pooler.dense.weight", "bert.pooler.dense.bias", "bilstm.rnn.weight_ih_l0", "bilstm.rnn.weight_hh_l0", "bilstm.rnn.bias_ih_l0", "bilstm.rnn.bias_hh_l0", "bilstm.rnn.weight_ih_l0_reverse", "bilstm.rnn.weight_hh_l0_reverse", "bilstm.rnn.bias_ih_l0_reverse", "bilstm.rnn.bias_hh_l0_reverse", "fc.weight", "fc.bias". Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.进程已结束,退出代码1

    bug 
    opened by HojaMuerta 14
  • windows10  python由3.8降级到3.6

    windows10 python由3.8降级到3.6

    Describe the bug

    A clear and concise description of what the bug is.

    各种bug,我刚开始创建了一个虚拟环境deepke,然后pip install deepke ,但是各种报错,我想问一下是不是windows下不行吖?有没有windows下的详细安装教程提供一下

    Environment (please complete the following information):

    • OS: [e.g. mac / window]
    • Python Version [e.g. 3.6]

    windows python3.6

    Screenshots

    If applicable, add screenshots to help explain your problem.

    Additional context

    Add any other context about the problem here.

    bug 
    opened by liuxiaobei727 12
  • 运行/data/qinglong/knowledgeGraph/DeepKE/example/ner/standard中的run_bert.py对英文数据集conll2003进行实体识别出现错误

    运行/data/qinglong/knowledgeGraph/DeepKE/example/ner/standard中的run_bert.py对英文数据集conll2003进行实体识别出现错误

    /home/qinglong/.conda/envs/deepke/lib/python3.8/site-packages/seqeval/metrics/sequence_labeling.py:171: UserWarning: [CLS] seems not to be NE tag. warnings.warn('{} seems not to be NE tag.'.format(chunk)) Traceback (most recent call last): File "/data/qinglong/knowledgegraph/DeepKE/example/ner/standard/run_bert.py", line 250, in main report = classification_report(y_true, y_pred,digits=4) File "/home/qinglong/.conda/envs/deepke/lib/python3.8/site-packages/seqeval/metrics/sequence_labeling.py", line 680, in classification_report target_names_pred = {type_name for type_name, _, _ in get_entities(y_pred, suffix)} File "/home/qinglong/.conda/envs/deepke/lib/python3.8/site-packages/seqeval/metrics/sequence_labeling.py", line 182, in get_entities _validate_chunk(chunk, suffix) File "/home/qinglong/.conda/envs/deepke/lib/python3.8/site-packages/seqeval/metrics/sequence_labeling.py", line 170, in _validate_chunk if not chunk.startswith(('B-', 'I-', 'E-', 'S-')): AttributeError: 'int' object has no attribute 'startswith' 经debug发现y_pred出现了标签中没有的标签0 y_pred =[['I-MISC', 'I-PER', 'I-MISC', 'B-MISC', 'I-LOC', 'I-ORG', '[CLS]', 'I-LOC', 'I-LOC', 'B-ORG', 'I-MISC', 'I-LOC', 'B-ORG', 0, 'I-MISC', 'I-ORG', 'B-ORG', 'I-MISC', 'B-MISC', 'I-MISC', 'I-MISC', 'I-MISC', 'I-MISC', 'I-LOC', '[CLS]', 'I-MISC', 'B-MISC', 'I-MISC', 'B-MISC', 'I-ORG', 'I-MISC', 'I-LOC', 'I-ORG', 'I-ORG', 'I-LOC', '[CLS]', 'I-MISC', '[CLS]', 'I-LOC', 'I-LOC', 'I-LOC', 'I-LOC', 'I-LOC', '[SEP]', '[SEP]', '[SEP]', '[SEP]', 'O', '[SEP]', '[CLS]', '[SEP]', '[CLS]', 'I-ORG', 'I-LOC', 'O', 'O', 'I-ORG', 'I-ORG', 'I-MISC', '[CLS]', '[CLS]', 'I-MISC', 'I-ORG', 'I-MISC', 'I-ORG', 'I-MISC', 'B-MISC', 'I-LOC', 'I-LOC', '[SEP]', '[SEP]', 'I-ORG', 'B-LOC', '[CLS]', '[CLS]', 'B-MISC', '[CLS]', '[SEP]', 'I-MISC', 'I-MISC', 'O', 'I-ORG', 'I-ORG', 'I-MISC', 'O', '[CLS]', 'I-ORG', 'I-MISC', 'I-ORG', 'I-ORG', 'I-ORG', 'I-ORG', 'I-ORG', 'B-ORG', 'B-ORG', 'I-ORG', 'I-ORG', 'I-ORG', 'I-ORG', 'I-MISC', 'I-ORG', 'I-MISC', '[CLS]', '[SEP]', '[CLS]', 'I-ORG', 'I-ORG', '[CLS]', 'I-ORG', 'I-ORG', 'I-ORG', 'I-ORG', 'I-ORG', '[CLS]', 'I-MISC', 'O', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]] 这个0是把‘o’认错了吗

    bug 
    opened by qinglongheu 10
  • ner-multimodal 模型无法训练

    ner-multimodal 模型无法训练

    Describe the question

    A clear and concise description of what the question is. 训练时一直出现这样的错误: OSError: Can't load config for 'openai/clip-vit-base-patch32'. Make sure that:

    • 'openai/clip-vit-base-patch32' is a correct model identifier listed on 'https://huggingface.co/models'

    • or 'openai/clip-vit-base-patch32' is the correct path to a directory containing a config.json file

    Environment (please complete the following information):

    • OS: [e.g. mac / window]
    • Python Version [e.g. 3.6]

    Screenshots

    If applicable, add screenshots to help explain your problem.

    Additional context

    Add any other context about the problem here.

    question 
    opened by 3525355094 10
  • BERT在大规模数据集上运行报错

    BERT在大规模数据集上运行报错

    你好,我重构了百度的数据集,重构后大概又30多w条。其中某些数据在其他模型预处理的时候会报错,但舍弃这些数据后最终跑通了,但是BERT模型遇到了如下问题,看上去应该是维度不太匹配,想请教一下问题可能会出在哪里,谢谢 >, TensorInfo<T, IndexType>, TensorInfo<long, IndexType>, int, int, IndexType, IndexType, long) [with T = float, IndexType = unsigned int, DstDim = 2, SrcDim = 2, IdxDim = -2, IndexIsMajor = true]: block: [195,0,0], thread: [31,0,0] AssertionsrcIndex < srcSelectDimSize failed. Traceback (most recent call last): File "main.py", line 82, in <module> macro_f1, micro_f1 = validate(test_dataloader, model, device, config) File "/home/***/deepke/deepke/trainer.py", line 53, in validate x = [i.to(device) for i in x] File "/home/***/deepke/deepke/trainer.py", line 53, in <listcomp> x = [i.to(device) for i in x] RuntimeError: CUDA error: device-side assert triggered

    question 
    opened by zhang-yunke 10
  • 在re中使用lm模型报错The size of tensor a (48) must match the size of tensor b (512) at non-singleton dimension 3

    在re中使用lm模型报错The size of tensor a (48) must match the size of tensor b (512) at non-singleton dimension 3

    Traceback (most recent call last): File "predict.py", line 141, in main y_pred = model(x) File "/home/WYF/.conda/envs/deepke/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/home/WYF/.conda/envs/deepke/lib/python3.8/site-packages/deepke/relation_extraction/standard/models/LM.py", line 22, in forward a = self.bert(word, attention_mask=mask) File "/home/WYF/.conda/envs/deepke/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/home/WYF/.conda/envs/deepke/lib/python3.8/site-packages/transformers/modeling_bert.py", line 833, in forward encoder_outputs = self.encoder( File "/home/WYF/.conda/envs/deepke/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/home/WYF/.conda/envs/deepke/lib/python3.8/site-packages/transformers/modeling_bert.py", line 476, in forward layer_outputs = layer_module( File "/home/WYF/.conda/envs/deepke/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/home/WYF/.conda/envs/deepke/lib/python3.8/site-packages/transformers/modeling_bert.py", line 398, in forward self_attention_outputs = self.attention( File "/home/WYF/.conda/envs/deepke/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/home/WYF/.conda/envs/deepke/lib/python3.8/site-packages/transformers/modeling_bert.py", line 333, in forward self_outputs = self.self( File "/home/WYF/.conda/envs/deepke/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/home/WYF/.conda/envs/deepke/lib/python3.8/site-packages/transformers/modeling_bert.py", line 262, in forward attention_scores = attention_scores + attention_mask RuntimeError: The size of tensor a (48) must match the size of tensor b (512) at non-singleton dimension 3

    question 
    opened by sayakawaiiyo 9
  • NER模型预测为空

    NER模型预测为空

    Describe the question

    我标注了一些数据,但是无论怎样,执行predict后,预测的实体都是空。甚至尝试预测了train data中的一条数据,结果同样为空。 我使用是 standard NER模型。 使用的预训练模型是在配置文件中是这样的,配置在文件夹的这里:\conf\hydra\model\bert.yaml,在这个文件中配置了我本地的pre model

    我不清楚是哪里出了问题。

    Environment (please complete the following information):

    • OS: [e.g. mac / window]
    • Python Version [e.g. 3.6]

    Screenshots

    If applicable, add screenshots to help explain your problem.

    Additional context

    Add any other context about the problem here.

    question 
    opened by ume-technology 8
  • when run ner, i got error : Key 'bert_model' is not in struct

    when run ner, i got error : Key 'bert_model' is not in struct

    Traceback (most recent call last): File "run_bert.py", line 93, in main tokenizer = BertTokenizer.from_pretrained(cfg.bert_model, do_lower_case=cfg.do_lower_case) omegaconf.errors.ConfigAttributeError: Key 'bert_model' is not in struct full_key: bert_model reference_type=Optional[Dict[Union[str, Enum], Any]] object_type=dict

    enhancement 
    opened by JxuHenry 8
  • Docker 环境下缓存工具版本错误

    Docker 环境下缓存工具版本错误

    Describe the question

    A clear and concise description of what the question is.

    在Docker环境下,python setup.py install过程中失败,提示是 cachetools 5.2.0 is installed but cachetools<5.0,>=2.0.0 is required by {'google-auth'}

    Environment (please complete the following information):

    • OS: window10、Dockers20.10。17
    • Python Version : 3.8.13

    Screenshots

    If applicable, add screenshots to help explain your problem. image

    Additional context

    • 我觉得README里应该添加如何使用Docker的说明,属实是走了不少的弯路
    help wanted question dependencies 
    opened by thredreams 6
Releases(2.1.2)
Owner
ZJUNLP
NLP Group of Knowledge Engine Lab at Zhejiang University
ZJUNLP
Deep Image Search is an AI-based image search engine that includes deep transfor learning features Extraction and tree-based vectorized search.

Deep Image Search - AI-Based Image Search Engine Deep Image Search is an AI-based image search engine that includes deep transfer learning features Ex

null 139 Jan 1, 2023
Code for the Population-Based Bandits Algorithm, presented at NeurIPS 2020.

Population-Based Bandits (PB2) Code for the Population-Based Bandits (PB2) Algorithm, from the paper Provably Efficient Online Hyperparameter Optimiza

Jack Parker-Holder 22 Nov 16, 2022
Microsoft Cognitive Toolkit (CNTK), an open source deep-learning toolkit

CNTK Chat Windows build status Linux build status The Microsoft Cognitive Toolkit (https://cntk.ai) is a unified deep learning toolkit that describes

Microsoft 17.3k Dec 29, 2022
Microsoft Cognitive Toolkit (CNTK), an open source deep-learning toolkit

CNTK Chat Windows build status Linux build status The Microsoft Cognitive Toolkit (https://cntk.ai) is a unified deep learning toolkit that describes

Microsoft 17k Feb 11, 2021
Simulate genealogical trees and genomic sequence data using population genetic models

msprime msprime is a population genetics simulator based on tskit. Msprime can simulate random ancestral histories for a sample of individuals (consis

Tskit developers 150 Dec 14, 2022
Clustering with variational Bayes and population Monte Carlo

pypmc pypmc is a python package focusing on adaptive importance sampling. It can be used for integration and sampling from a user-defined target densi

null 45 Feb 6, 2022
Locally cache assets that are normally streamed in POPULATION: ONE

Population One Localizer This is no longer needed as of the build shipped on 03/03/22, thank you bigbox :) Locally cache assets that are normally stre

Ahman Woods 2 Mar 4, 2022
FAMIE is a comprehensive and efficient active learning (AL) toolkit for multilingual information extraction (IE)

FAMIE: A Fast Active Learning Framework for Multilingual Information Extraction

null 18 Sep 1, 2022
git《Commonsense Knowledge Base Completion with Structural and Semantic Context》(AAAI 2020) GitHub: [fig1]

Commonsense Knowledge Base Completion with Structural and Semantic Context Code for the paper Commonsense Knowledge Base Completion with Structural an

AI2 96 Nov 5, 2022
RNG-KBQA: Generation Augmented Iterative Ranking for Knowledge Base Question Answering

RNG-KBQA: Generation Augmented Iterative Ranking for Knowledge Base Question Answering Authors: Xi Ye, Semih Yavuz, Kazuma Hashimoto, Yingbo Zhou and

Salesforce 72 Dec 5, 2022
A knowledge base construction engine for richly formatted data

Fonduer is a Python package and framework for building knowledge base construction (KBC) applications from richly formatted data. Note that Fonduer is

HazyResearch 386 Dec 5, 2022
A toolkit for document-level event extraction, containing some SOTA model implementations

❤️ A Toolkit for Document-level Event Extraction with & without Triggers Hi, there ?? . Thanks for your stay in this repo. This project aims at buildi

Tong Zhu(朱桐) 159 Dec 22, 2022
Code and datasets for the paper "KnowPrompt: Knowledge-aware Prompt-tuning with Synergistic Optimization for Relation Extraction"

KnowPrompt Code and datasets for our paper "KnowPrompt: Knowledge-aware Prompt-tuning with Synergistic Optimization for Relation Extraction" Requireme

ZJUNLP 137 Dec 31, 2022
Trading and Backtesting environment for training reinforcement learning agent or simple rule base algo.

TradingGym TradingGym is a toolkit for training and backtesting the reinforcement learning algorithms. This was inspired by OpenAI Gym and imitated th

Yvictor 1.1k Jan 2, 2023
This is an open-source toolkit for Heterogeneous Graph Neural Network(OpenHGNN) based on DGL [Deep Graph Library] and PyTorch.

This is an open-source toolkit for Heterogeneous Graph Neural Network(OpenHGNN) based on DGL [Deep Graph Library] and PyTorch.

BUPT GAMMA Lab 519 Jan 2, 2023
Code for the CVPR 2021 paper: Understanding Failures of Deep Networks via Robust Feature Extraction

Welcome to Barlow Barlow is a tool for identifying the failure modes for a given neural network. To achieve this, Barlow first creates a group of imag

Sahil Singla 33 Dec 5, 2022
The (Official) PyTorch Implementation of the paper "Deep Extraction of Manga Structural Lines"

MangaLineExtraction_PyTorch The (Official) PyTorch Implementation of the paper "Deep Extraction of Manga Structural Lines" Usage model_torch.py [sourc

Miaomiao Li 82 Jan 2, 2023
Models Supported: AlbUNet [18, 34, 50, 101, 152] (1D and 2D versions for Single and Multiclass Segmentation, Feature Extraction with supports for Deep Supervision and Guided Attention)

AlbUNet-1D-2D-Tensorflow-Keras This repository contains 1D and 2D Signal Segmentation Model Builder for AlbUNet and several of its variants developed

Sakib Mahmud 1 Nov 15, 2021
Deep learning (neural network) based remote photoplethysmography: how to extract pulse signal from video using deep learning tools

Deep-rPPG: Camera-based pulse estimation using deep learning tools Deep learning (neural network) based remote photoplethysmography: how to extract pu

Terbe Dániel 138 Dec 17, 2022