Prompts4Keras icon indicating copy to clipboard operation
Prompts4Keras copied to clipboard

tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file /media/server01/sda2/zixiao/SAwithTime/code/zsl_nli_emotion_prompts-main/code/sota/Prompts4Keras-main/models/BERT-Large-Mix5-5M/model.ckpt-5000000.data-00000-of-00001: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?

Open MidiyaZhu opened this issue 1 year ago • 0 comments

You model cannot be used properly?

If I load you model according to the given download link and added into utils.datasets as elif (model_name == 'bert_large_cased_mix5'): self.config_path = r'./models/BERT-Large-Mix5-5M/bert_config.json' self.checkpoint_path = r'./models/BERT-Large-Mix5-5M/model.ckpt-5000000.data-00000-of-00001' self.dict_path = r'./models/BERT-Large-Mix5-5M/vocab.txt' it report error elif (model_name == 'bert_large_cased_mix5'): self.config_path = r'/media/server01/sda2/zixiao/SAwithTime/code/zsl_nli_emotion_prompts-main/code/sota/Prompts4Keras-main/models/BERT-Large-Mix5-5M/bert_config.json' self.checkpoint_path = r'/media/server01/sda2/zixiao/SAwithTime/code/zsl_nli_emotion_prompts-main/code/sota/Prompts4Keras-main/models/BERT-Large-Mix5-5M/model.ckpt-5000000.data-00000-of-00001' self.dict_path = r'/media/server01/sda2/zixiao/SAwithTime/code/zsl_nli_emotion_prompts-main/code/sota/Prompts4Keras-main/models/BERT-Large-Mix5-5M/vocab.txt'

If I loaded from transformers (I am not sure whether I did it correctly. Please check it for me)

`from transformers import AutoModel, AutoTokenizer transfomer = "sunyilgdx/bert_large_cased_mix5"

bert_model = AutoModel.from_pretrained(transfomer)

tokenizer = AutoTokenizer.from_pretrained(transfomer)`

it report error OSError: sunyilgdx/bert_large_cased_mix5 does not appear to have a file named config.json. Checkout 'https://huggingface.co/sunyilgdx/bert_large_cased_mix5/main' for available files.

how to fix it?

can you give a nsp_classification.py which already contains the codes that loaded your model?

thank you

MidiyaZhu avatar May 25 '23 06:05 MidiyaZhu