wangxin0126 / ToTACRED

8 stars 2 forks source link

Have you tested the outputs in our ToTacredResult folder in AGGCN? #1

Open hogunpark opened 4 years ago

hogunpark commented 4 years ago

Thank you for sharing your code. I tested the output for AGGCN, but I came across the error as below:

(aggcn) myuserid@GPUserver:~/code/AGGCN$ python eval.py saved_models/01 --dataset test Loading model from saved_models/01/best_model.pt Finetune all embeddings. /etc/anaconda3/envs/aggcn/lib/python3.6/site-packages/torch/nn/modules/rnn.py:38: UserWarning: dropout option adds dropout after all but last recurrent layer, so non-zero dropout expects num_layers greater than 1, but got dropout=0.5 and num_layers=1 "num_layers={}".format(dropout, num_layers)) Vocab size 53953 loaded from file Loading data from dataset/tacred/test.json with batch size 50... Traceback (most recent call last): File "eval.py", line 48, in batch = DataLoader(data_file, opt['batch_size'], opt, vocab, evaluation=True) File "/code/AGGCN/data/loader.py", line 26, in init data = self.preprocess(data, vocab, opt) File "/code/AGGCN/data/loader.py", line 52, in preprocess tokens[ss:se+1] = ['SUBJ-'+d['subj_type']] * (se-ss+1) TypeError: must be str, not list

My environment is Python 3.6.8, PyTorch 0.4.1, and CUDA 9.0. Thank you so much for your help.

ZohaibRamzan commented 3 years ago

@hogunpark have u been successful in running the dataset with AGGCN?