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
Julia package for contraction of tensor networks, based on the sweep line algorithm outlined in the paper General tensor network decoding of 2D Pauli codes

Julia package for contraction of tensor networks, based on the sweep line algorithm outlined in the paper General tensor network decoding of 2D Pauli codes

Christopher T. Chubb 35 Dec 21, 2022
Official code repository for the EMNLP 2021 paper

Integrating Visuospatial, Linguistic and Commonsense Structure into Story Visualization PyTorch code for the EMNLP 2021 paper "Integrating Visuospatia

Adyasha Maharana 23 Dec 19, 2022
We have made you a wrapper you can't refuse

We have made you a wrapper you can't refuse We have a vibrant community of developers helping each other in our Telegram group. Join us! Stay tuned fo

20.6k Jan 09, 2023
A Survey on Deep Learning Technique for Video Segmentation

A Survey on Deep Learning Technique for Video Segmentation A Survey on Deep Learning Technique for Video Segmentation Wenguan Wang, Tianfei Zhou, Fati

Tianfei Zhou 112 Dec 12, 2022
Tool for installing and updating MiSTer cores and other files

MiSTer Downloader This tool installs and updates all the cores and other extra files for your MiSTer. It also updates the menu core, the MiSTer firmwa

72 Dec 24, 2022
Source code for the GPT-2 story generation models in the EMNLP 2020 paper "STORIUM: A Dataset and Evaluation Platform for Human-in-the-Loop Story Generation"

Storium GPT-2 Models This is the official repository for the GPT-2 models described in the EMNLP 2020 paper [STORIUM: A Dataset and Evaluation Platfor

Nader Akoury 27 Dec 20, 2022
Sample Prior Guided Robust Model Learning to Suppress Noisy Labels

PGDF This repo is the official implementation of our paper "Sample Prior Guided Robust Model Learning to Suppress Noisy Labels ". Citation If you use

CVSM Group - email: <a href=[email protected]"> 22 Dec 23, 2022
An addon uses SMPL's poses and global translation to drive cartoon character in Blender.

Blender addon for driving character The addon drives the cartoon character by passing SMPL's poses and global translation into model's armature in Ble

犹在镜中 153 Dec 14, 2022
Official Implementation of VAT

Semantic correspondence Few-shot segmentation Cost Aggregation Is All You Need for Few-Shot Segmentation For more information, check out project [Proj

Hamacojr 114 Dec 27, 2022
A new codebase for Group Activity Recognition. It contains codes for ICCV 2021 paper: Spatio-Temporal Dynamic Inference Network for Group Activity Recognition and some other methods.

Spatio-Temporal Dynamic Inference Network for Group Activity Recognition The source codes for ICCV2021 Paper: Spatio-Temporal Dynamic Inference Networ

40 Dec 12, 2022
Implementation of the GVP-Transformer, which was used in the paper "Learning inverse folding from millions of predicted structures" for de novo protein design alongside Alphafold2

GVP Transformer (wip) Implementation of the GVP-Transformer, which was used in the paper Learning inverse folding from millions of predicted structure

Phil Wang 19 May 06, 2022
Improving the robustness and performance of biomedical NLP models through adversarial training

RobustBioNLP Improving the robustness and performance of biomedical NLP models through adversarial training In this repository you can find suppliment

Milad Moradi 3 Sep 20, 2022
Code for the paper Language as a Cognitive Tool to Imagine Goals in Curiosity Driven Exploration

IMAGINE: Language as a Cognitive Tool to Imagine Goals in Curiosity Driven Exploration This repo contains the code base of the paper Language as a Cog

Flowers Team 26 Dec 22, 2022
Unsupervised Image to Image Translation with Generative Adversarial Networks

Unsupervised Image to Image Translation with Generative Adversarial Networks Paper: Unsupervised Image to Image Translation with Generative Adversaria

Hao 71 Oct 30, 2022
Code for Neural-GIF: Neural Generalized Implicit Functions for Animating People in Clothing(ICCV21)

NeuralGIF Code for Neural-GIF: Neural Generalized Implicit Functions for Animating People in Clothing(ICCV21) We present Neural Generalized Implicit F

Garvita Tiwari 104 Nov 18, 2022
DLFlow is a deep learning framework.

DLFlow是一套深度学习pipeline,它结合了Spark的大规模特征处理能力和Tensorflow模型构建能力。利用DLFlow可以快速处理原始特征、训练模型并进行大规模分布式预测,十分适合离线环境下的生产任务。利用DLFlow,用户只需专注于模型开发,而无需关心原始特征处理、pipeline构建、生产部署等工作。

DiDi 152 Oct 27, 2022
Command-line tool for downloading and extending the RedCaps dataset.

RedCaps Downloader This repository provides the official command-line tool for downloading and extending the RedCaps dataset. Users can seamlessly dow

RedCaps dataset 33 Dec 14, 2022
Official implementation of "OpenPifPaf: Composite Fields for Semantic Keypoint Detection and Spatio-Temporal Association" in PyTorch.

openpifpaf Continuously tested on Linux, MacOS and Windows: New 2021 paper: OpenPifPaf: Composite Fields for Semantic Keypoint Detection and Spatio-Te

VITA lab at EPFL 50 Dec 29, 2022
PyTorch code of paper "LiVLR: A Lightweight Visual-Linguistic Reasoning Framework for Video Question Answering"

LiVLR-VideoQA We propose a Lightweight Visual-Linguistic Reasoning framework (LiVLR) for VideoQA. The overview of LiVLR: Evaluation on MSRVTT-QA Datas

JJ Jiang 7 Dec 30, 2022
Official implementation of paper "Query2Label: A Simple Transformer Way to Multi-Label Classification".

Introdunction This is the official implementation of the paper "Query2Label: A Simple Transformer Way to Multi-Label Classification". Abstract This pa

Shilong Liu 274 Dec 28, 2022