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

The model cannot be loaded offline.And I found the problem and gave the solution. #26

Open
aa429879269 opened this issue Jan 18, 2022 · 0 comments

Comments

@aa429879269
Copy link

download the offline file(pytorch_model.bin/vocab.txt/config.json eg. ) If we put these files into biobert-base-cased-v1.1.And we type the comman(
--data_dir
../datasets/NER/NCBI-disease
--labels
../datasets/NER/NCBI-disease/labels.txt
--model_name_or_path
./biobert-base-cased-v1.1
--output_dir
output/NCBI-disease
--max_seq_length
128
--num_train_epochs
3
--per_device_train_batch_size
1
--save_steps
1000
--seed
1
--do_train
--do_eval
--do_predict
--overwrite_output_dir ) to run the run_ner.py.We will faild.You have to fix the code in line 245 in run_ner.py." trainer.train(
model_path=model_args.model_name_or_path if os.path.isdir(model_args.model_name_or_path) else None
)" = > trainer.train(
model_path = None
).
If we don't change this line code, the model will output 2 class.There will bring error.NER have to 3 class.

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