Skip to content

Commit

Permalink
Merge pull request #185 from ymoslem/master
Browse files Browse the repository at this point in the history
Update base.py Fixes: AttributeError: 'dict' object has no attribute 'scores'
  • Loading branch information
ricardorei authored Nov 21, 2023
2 parents 60886e6 + 8b5103b commit 45cb572
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion comet/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ def predict(
# If we are not in the GLOBAL RANK we will return None
exit()

scores = torch.cat([pred.scores for pred in predictions], dim=0).tolist()
scores = torch.cat([pred["scores"] for pred in predictions], dim=0).tolist()
if "metadata" in predictions[0]:
metadata = flatten_metadata([pred.metadata for pred in predictions])
else:
Expand Down

2 comments on commit 45cb572

@thekaranacharya
Copy link

@thekaranacharya thekaranacharya commented on 45cb572 Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is merged in main, but not yet in the package - will allow users to directly use the wmt22-cometkiwi-da model from the library without any errors.

@ricardorei
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was on vocations but Ill release a new version today

Please sign in to comment.