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

Using Clinical Models as Model_Type in BertScore #184

Open
behnazeslami opened this issue May 6, 2024 · 0 comments
Open

Using Clinical Models as Model_Type in BertScore #184

behnazeslami opened this issue May 6, 2024 · 0 comments

Comments

@behnazeslami
Copy link

behnazeslami commented May 6, 2024

Hi,
I am going to use the clinical models like "BSC-LT/roberta-base-biomedical-clinical-es", "Clinical BioBERT", or even one of the clinical models in this link "https://huggingface.co/models?search=clinical" as a model_type in bert score but I get the following error:

P, R, F1 = score(cands, refs, lang="en", model_type="BSC-LT/roberta-base-biomedical-clinical-es", verbose=True)

KeyError Traceback (most recent call last)
in <cell line: 1>()
----> 1 P, R, F1 = score(cands, refs, lang="en", model_type="BSC-LT/roberta-base-biomedical-clinical-es", verbose=True /usr/local/lib/python3.10/dist-packages/bert_score/score.py in score(cands, refs, model_type, num_layers, verbose, idf, device, batch_size, nthreads, all_layers, lang, return_hash, rescale_with_baseline, baseline_path, use_fast_tokenizer)
93 model_type = lang2model[lang]
94 if num_layers is None:
---> 95 num_layers = model2layers[model_type]
96
97 tokenizer = get_tokenizer(model_type, use_fast_tokenizer) KeyError: 'BSC-LT/roberta-base-biomedical-clinical-es

Could you please assist me how I can solve this issue?
Thanks

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