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
PSPNet in Chainer

PSPNet This is an unofficial implementation of Pyramid Scene Parsing Network (PSPNet) in Chainer. Training Requirement Python 3.4.4+ Chainer 3.0.0b1+

Shunta Saito 76 Dec 12, 2022
🔪 Elimination based Lightweight Neural Net with Pretrained Weights

ELimNet ELimNet: Eliminating Layers in a Neural Network Pretrained with Large Dataset for Downstream Task Removed top layers from pretrained Efficient

snoop2head 4 Jul 12, 2022
ChineseBERT: Chinese Pretraining Enhanced by Glyph and Pinyin Information

ChineseBERT: Chinese Pretraining Enhanced by Glyph and Pinyin Information This repository contains code, model, dataset for ChineseBERT at ACL2021. Ch

413 Dec 01, 2022
Official PyTorch implementation of RobustNet (CVPR 2021 Oral)

RobustNet (CVPR 2021 Oral): Official Project Webpage Codes and pretrained models will be released soon. This repository provides the official PyTorch

Sungha Choi 173 Dec 21, 2022
Poplar implementation of "Bundle Adjustment on a Graph Processor" (CVPR 2020)

Poplar Implementation of Bundle Adjustment using Gaussian Belief Propagation on Graphcore's IPU Implementation of CVPR 2020 paper: Bundle Adjustment o

Joe Ortiz 34 Dec 05, 2022
Predictive Modeling on Electronic Health Records(EHR) using Pytorch

Predictive Modeling on Electronic Health Records(EHR) using Pytorch Overview Although there are plenty of repos on vision and NLP models, there are ve

81 Jan 01, 2023
An API-first distributed deployment system of deep learning models using timeseries data to analyze and predict systems behaviour

Gordo Building thousands of models with timeseries data to monitor systems. Table of content About Examples Install Uninstall Developer manual How to

Equinor 26 Dec 27, 2022
AoT is a system for automatically generating off-target test harness by using build information.

AoT: Auto off-Target Automatically generating off-target test harness by using build information. Brought to you by the Mobile Security Team at Samsun

Samsung 10 Oct 19, 2022
SnapMix: Semantically Proportional Mixing for Augmenting Fine-grained Data (AAAI 2021)

SnapMix: Semantically Proportional Mixing for Augmenting Fine-grained Data (AAAI 2021) PyTorch implementation of SnapMix | paper Method Overview Cite

DavidHuang 126 Dec 30, 2022
MVSDF - Learning Signed Distance Field for Multi-view Surface Reconstruction

MVSDF - Learning Signed Distance Field for Multi-view Surface Reconstruction This is the official implementation for the ICCV 2021 paper Learning Sign

110 Dec 20, 2022
Code for "Unsupervised Layered Image Decomposition into Object Prototypes" paper

DTI-Sprites Pytorch implementation of "Unsupervised Layered Image Decomposition into Object Prototypes" paper Check out our paper and webpage for deta

40 Dec 22, 2022
A collection of Reinforcement Learning algorithms from Sutton and Barto's book and other research papers implemented in Python.

Reinforcement-Learning-Notebooks A collection of Reinforcement Learning algorithms from Sutton and Barto's book and other research papers implemented

Pulkit Khandelwal 1k Dec 28, 2022
Free-duolingo-plus - Duolingo account creator that uses your invite code to get you free duolingo plus

free-duolingo-plus duolingo account creator that uses your invite code to get yo

1 Jan 06, 2022
Vehicle Detection Using Deep Learning and YOLO Algorithm

VehicleDetection Vehicle Detection Using Deep Learning and YOLO Algorithm Dataset take or find vehicle images for create a special dataset for fine-tu

Maryam Boneh 96 Jan 05, 2023
《Towards High Fidelity Face Relighting with Realistic Shadows》(CVPR 2021)

Towards High Fidelity Face-Relighting with Realistic Shadows Andrew Hou, Ze Zhang, Michel Sarkis, Ning Bi, Yiying Tong, Xiaoming Liu. In CVPR, 2021. T

114 Dec 10, 2022
VD-BERT: A Unified Vision and Dialog Transformer with BERT

VD-BERT: A Unified Vision and Dialog Transformer with BERT PyTorch Code for the following paper at EMNLP2020: Title: VD-BERT: A Unified Vision and Dia

Salesforce 44 Nov 01, 2022
🥇 LG-AI-Challenge 2022 1위 솔루션 입니다.

LG-AI-Challenge-for-Plant-Classification Dacon에서 진행된 농업 환경 변화에 따른 작물 병해 진단 AI 경진대회 에 대한 코드입니다. (colab directory에 코드가 잘 정리 되어있습니다.) Requirements python

siwooyong 10 Jun 30, 2022
Experimental Python implementation of OpenVINO Inference Engine (very slow, limited functionality). All codes are written in Python. Easy to read and modify.

PyOpenVINO - An Experimental Python Implementation of OpenVINO Inference Engine (minimum-set) Description The PyOpenVINO is a spin-off product from my

Yasunori Shimura 7 Oct 31, 2022
An end-to-end regression problem of predicting the price of properties in Bangalore.

Bangalore-House-Price-Prediction An end-to-end regression problem of predicting the price of properties in Bangalore. Deployed in Heroku using Flask.

Shruti Balan 1 Nov 25, 2022
Code and hyperparameters for the paper "Generative Adversarial Networks"

Generative Adversarial Networks This repository contains the code and hyperparameters for the paper: "Generative Adversarial Networks." Ian J. Goodfel

Ian Goodfellow 3.5k Jan 08, 2023