Skip to content

Commit 5cc05e3

Browse files
committed
fix: description vectors error
1 parent fdae921 commit 5cc05e3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

autointent/modules/scoring/_description/description.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,10 @@ def predict(self, utterances: list[str]) -> NDArray[np.float64]:
174174
error_text = "Cross encoder is not initialized. Call fit() before predict()."
175175
raise RuntimeError(error_text)
176176

177+
if self._description_texts is None:
178+
error_text = "Description texts are not initialized. Call fit() before predict()."
179+
raise RuntimeError(error_text)
180+
177181
pairs = [(utterance, description) for utterance in utterances for description in self._description_texts]
178182

179183
scores = self._cross_encoder.predict(pairs)

0 commit comments

Comments
 (0)