Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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? #1

Open
MidiyaZhu opened this issue May 25, 2023 · 0 comments

Comments

@MidiyaZhu
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant