Skip to content

Commit fdae921

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

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

autointent/modules/scoring/_description/description.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,11 @@ def predict(self, utterances: list[str]) -> NDArray[np.float64]:
156156
Returns:
157157
Array of probabilities for each utterance
158158
"""
159-
if self._description_vectors is None:
160-
error_text = "Description vectors are not initialized. Call fit() before predict()."
161-
raise RuntimeError(error_text)
162-
163159
if self._encoder_type == "bi":
160+
if self._description_vectors is None:
161+
error_text = "Description vectors are not initialized. Call fit() before predict()."
162+
raise RuntimeError(error_text)
163+
164164
if self._embedder is None:
165165
error_text = "Embedder is not initialized. Call fit() before predict()."
166166
raise RuntimeError(error_text)

0 commit comments

Comments
 (0)