Some model can't be download automatically
See original GitHub issueDescribe the bug I’m using the minimal example from readme, and change it to parse chinese:
But upon running, it errors:
OSError: Unable to load weights from pytorch checkpoint file. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.
While bert-base-cased
can run without any error.
To Reproduce Steps to reproduce the behavior:
from simpletransformers.classification import ClassificationModel
import pandas as pd
# Train and Evaluation data needs to be in a Pandas Dataframe of two columns. The first column is the text with type str, and the second column is the label with type int.
train_data = [['属于类一的例句', 1], ['属于类二的例句', 0]]
train_df = pd.DataFrame(train_data)
eval_data = [['属于类一的例句2', 1], ['属于类二的例句1', 0]]
eval_df = pd.DataFrame(eval_data)
# Create a ClassificationModel
model = ClassificationModel('bert', 'bert-base-chinese', use_cuda=False, args={'overwrite_output_dir': True}) # You can set class weights by using the optional weight argument
# Train the model
model.train_model(train_df)
# Evaluate the model
result, model_outputs, wrong_predictions = model.eval_model(eval_df)
Expected behavior Run as example in readme.
Screenshots
Desktop (please complete the following information):
- MacOS 10.15.2
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Allow or Block Automatic File Downloads for Apps in Windows ...
Allow or Block Automatic File Downloads for Apps in Windows 10 [Tutorial].When you use an online ... Your browser can't play this video....
Read more >Fix file download errors - Google Chrome Help
This error means that there's not enough space on your computer to download the file. To fix the error: Delete some files from...
Read more >Automatic file download notifications in Windows 10
Tip: Don't want notifications for automatic file downloads? Select the Start button, then select Settings > System > Notifications & actions , and...
Read more >Downloading 3D models - Sketchfab Help Center
Every Sketchfab user has the ability to download select 3D models. You can specifically search for downloadable models (by toggling...
Read more >How to Fix Images Not Downloading Automatically in Outlook
If you're using Outlook 2007, go to Tools > Trust Center > Automatic Download and then uncheck “Don't download pictures automatically in HTML...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you, I can confirm it works!
It’s working for me. It’s possible that there is a corrupted model saved on your system. Try this: