PetrosStav/BioMRC_code

Running SciBertReaderSum

Opened this issue · 0 comments

Hi my name is Eladio! nice to meet you! your project is so good. I would like to use the dataset in my Master's project about MRC in Medical field. I have been trying to run this by myself but I have stopped because some errors have been detected in this process. Please I would like some help/guide to run the project.

The errors have been:

  1. The folder "bert_model_results" isn't in the repository. Then I create the folder in the directory. But I don't know if it is right.

  2. The model "scibert_scivocab_uncased" isn't recognized by "BertTokenizer" and "BertModel". If the model run using "bert-base-uncased" this part works.

Error:

"Model name './scibert_scivocab_uncased/' was not found in model name list (bert-base-uncased, bert-large-uncased, bert-base-cased, bert-large-cased, bert-base-multilingual-uncased, bert-base-multilingual-cased, bert-base-chinese). We assumed './scibert_scivocab_uncased/' was a path or url but couldn't find any file associated to this path or url."

Code:
...

class SciBertReaderSum(nn.Module):
def init(self, frozen_top):
super(SciBertReaderSum, self).init()

    self.tok = BertTokenizer.from_pretrained('./scibert_scivocab_uncased/')
    self.bert = BertModel.from_pretrained('./scibert_scivocab_uncased/')

...

  1. Jason files "dataset_part1_small.json, dataset_part2_small.json, dataset_part3_small.json etc..." aren't existing... Then Idk what to do...

Error:

FileNotFoundError Traceback (most recent call last)
Input In [31], in
59 model.train()
60 for tf in [1, 2, 3, 4, 5, 6, 7]:
---> 61 with open('../dataset_part{}_small.json'.format(tf)) as fi:
62 data = json.load(fi)
63 print('Training on file {}'.format(tf))

FileNotFoundError: [Errno 2] No such file or directory: '../dataset_part1_small.json'