Skip to content

Commit 2919e2f

Browse files
committed
Fix fit method status check
1 parent 2fc378f commit 2919e2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autointent/modules/scoring/_ptuning/ptuning.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def predict(self, utterances: list[str]) -> npt.NDArray[Any]:
194194
Raises:
195195
RuntimeError: If the model is not trained yet
196196
"""
197-
if self._model is None or self._tokenizer is None:
197+
if getattr(self, "_model", None) is None or getattr(self, "_tokenizer", None) is None:
198198
msg = "Model is not trained. Call fit() first."
199199
raise RuntimeError(msg)
200200

0 commit comments

Comments
 (0)