Skip to content

Commit

Permalink
Merge pull request #365 from vespa-engine/tgm/fix-ml-test
Browse files Browse the repository at this point in the history
fix broken test due to transformer library changes
  • Loading branch information
thigm85 authored Aug 1, 2022
2 parents 04a0417 + d63abe1 commit ad53d7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vespa/ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ def predict(self, text: str) -> List:
pipeline = self._create_pipeline()
predictions = pipeline(text)
return [
[x["score"] for x in predictions if x["label"] == "LABEL_0"][0],
[x["score"] for x in predictions if x["label"] == "LABEL_1"][0],
[x["score"] for x in predictions[0] if x["label"] == "LABEL_0"][0],
[x["score"] for x in predictions[0] if x["label"] == "LABEL_1"][0],
]

@staticmethod
Expand Down

0 comments on commit ad53d7a

Please sign in to comment.