-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
use_custom_baseline still produces errors for bertscore #843
Comments
Thanks for reporting ! That's a bug indeed |
This error is because of a mismatch between |
Thanks for the heads up @pvl and for the PR as well :) |
Hello everyone, I think the problem is not solved:
This code is produced using |
Hi ! This has been fixed by #2770, we'll do a new release soon to make the fix available :) In the meantime please use an older version of |
metric = load_metric('bertscore')
a1 = "random sentences"
b1 = "random sentences"
metric.compute(predictions = [a1], references = [b1], lang = 'en')
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/stephen_chan/.local/lib/python3.6/site-packages/datasets/metric.py", line 393, in compute output = self._compute(predictions=predictions, references=references, **kwargs) File "/home/stephen_chan/.cache/huggingface/modules/datasets_modules/metrics/bertscore/361e597a01a41d6cf95d94bbfb01dea16261687abc0c6c74cc9930f80488f363/bertscore.py", line 108, in _compute hashcode = bert_score.utils.get_hash(model_type, num_layers, idf, rescale_with_baseline) TypeError: get_hash() missing 1 required positional argument: 'use_custom_baseline'
Adding 'use_custom_baseline = False' as an argument produces this error
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/stephen_chan/.local/lib/python3.6/site-packages/datasets/metric.py", line 393, in compute output = self._compute(predictions=predictions, references=references, **kwargs) TypeError: _compute() got an unexpected keyword argument 'use_custom_baseline'
This is on Ubuntu 18.04, Python 3.6.9, datasets version 1.1.2
The text was updated successfully, but these errors were encountered: