ShannonAI / glyce

Code for NeurIPS 2019 - Glyce: Glyph-vectors for Chinese Character Representations
https://arxiv.org/abs/1901.10125
Apache License 2.0
421 stars 75 forks source link

bq 数据集没有找到 #31

Open Li-rr opened 4 years ago

Li-rr commented 4 years ago

您好,我下载了bq数据集,设置了数据集路径,为什么会报这样的错,是需要数据预处理吗

input_file /home/lrr/workspace/glyce_datset/sent_pair/bq/train.json
Traceback (most recent call last):
  File "/home/lrr/workspace/glyce/glyce/bin/run_bert_glyce_classifier.py", line 388, in <module>
    main()
  File "/home/lrr/workspace/glyce/glyce/bin/run_bert_glyce_classifier.py", line 380, in main
    train_loader, dev_loader, test_loader, num_train_steps, label_list = load_data(config)
  File "/home/lrr/workspace/glyce/glyce/bin/run_bert_glyce_classifier.py", line 133, in load_data
    train_examples = data_processor.get_train_examples(config.data_dir)
  File "/home/lrr/workspace/glyce/glyce/dataset_readers/bert_sent_pair.py", line 132, in get_train_examples
    self._read_tsv(os.path.join(data_dir, "train.json")), "train")
  File "/home/lrr/workspace/glyce/glyce/dataset_readers/bert_data_utils.py", line 78, in _read_tsv
    with open(input_file, "r") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/lrr/workspace/glyce_datset/sent_pair/bq/train.json'

这是我的数据集设置:

echo "data_sign: $data_sign"
#data_dir=/data/nfsdata/nlp/datasets/sentence_pair/bq_corpus
data_dir=/home/lrr/workspace/glyce_datset/sent_pair/bq
output_dir=../export-model # change save_path !!!

这是文件夹内容

image

okcd00 commented 3 years ago

我也遇到了一样的问题,改一下数据加载的函数可能就可以了。( Issue #38 )

Li-rr commented 3 years ago

我也遇到了一样的问题,改一下数据加载的函数可能就可以了。( Issue #38 )

谢谢您,我去试试