Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5049

Can't load config for text classification, but within directory there is

$
0
0

i have this script with this error. I don't know why i makes this. My directory has everthing: cofig.json; model.pt; pytorch_model.bin, special_tokens_map.json; tokenizer.json; tokenizer_config.json; vocab.txt.it is possible to find one solution? Because my script about text classification haven't had this problem before.

OSError: Can't load config for '/content/test_dataset/xlm-roberta_model_save_non_filtrato'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure '/content/test_dataset/xlm-roberta_model_save_non_filtrato' is the correct path to a directory containing a config.json file

from transformers import AutoTokenizer, XLMRobertaForSequenceClassification    import torch    # Load the BERT tokenizer.    print('Loading AutoTokenizer...')    tokenizer = AutoTokenizer.from_pretrained(output_dir) #here there is the error    model_prediction = XLMRobertaForSequenceClassification.from_pretrained(output_dir)

Viewing all articles
Browse latest Browse all 5049

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>