-
Notifications
You must be signed in to change notification settings - Fork 75
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
Multi-gpu inference returns AttributeError #177
Comments
FYI: I submitted a PR with proposed fixes in #178 |
Thanks @arturnn I will look into the PR asap! |
@arturnn haven't had time yet, but its not forgotten. |
Hi ! I just got a very similar error ('dict' object has no attribute 'scores', also highlighting pred.scores in the trace), but in my case there is no GPU on the machine I used. The first time I got the error I specified gpus=0 (I thought it was the correct way to make it run on CPU), but then I removed the parameter and got the same error as well. %env TOKENIZERS_PARALLELISM=false
issue_data = [
{
"src": "10 到 15 分钟可以送到吗",
"mt": "Can I receive my food in 10 to 15 minutes?",
"ref": "Can it be delivered between 10 to 15 minutes?"
},
{
"src": "Pode ser entregue dentro de 10 a 15 minutos?",
"mt": "Can you send it for 10 to 15 minutes?",
"ref": "Can it be delivered between 10 to 15 minutes?"
}
]
comet_model = load_from_checkpoint(download_model("Unbabel/wmt22-comet-da"))
comet_output = comet_model.predict(issue_data, batch_size=8)
print(model_output)
print(model_output.system_scores) Ouput:
I'm using unbabel-comet version 2.2.0 and Python 3.10, on Ubuntu 22.04 |
I ran into the same problem when using test cases on huggingface.
|
Facing the same issue: |
I just publish a new release that should solve this. |
🐛 Bug
When trying to run scoring with COMET models via
comet-score
(although the issue is the same withcomet-mbr
when pre-scoring with qe models using multiple gpus) I get the following error. It works fine with--gpus 0
(running on cpu) or--gpus 1
. I tested it with wmt22-comet-da and wmt21-comet-mqm models.To Reproduce
Run
comet-score
command with--gpus
> 1 using the latest version of the package.Expected behaviour
Segment and system scores should be returned, as is the case with single gpu inference.
Environment
OS: Debian 11 (bullseye)
Packaging: tried both conda (with python 3.11.6) and standard virtual environment with installation via pip (python 3.9.2)
Version: latest master & current PyPI (2.2.0)
The text was updated successfully, but these errors were encountered: