Skip to content

Commit 96ef82e

Browse files
committed
fixes problem of skipping last preds and labels
1 parent 1581693 commit 96ef82e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

chebai/result/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def evaluate_model(
116116
data_list = data_df.to_dict(orient="records")
117117
else:
118118
data_list = data_module.load_processed_data("test", filename)
119+
torch.save(data_list,"./data_list.pt")
119120
data_list = data_list[: data_module.data_limit]
120121
preds_list = []
121122
labels_list = []
@@ -159,7 +160,7 @@ def evaluate_model(
159160
test_labels = _concat_tuple(labels_list)
160161
return test_preds, test_labels
161162
return test_preds, None
162-
elif len(preds_list) < 0:
163+
elif len(preds_list) > 0:
163164
if len(preds_list) > 0 and preds_list[0] is not None:
164165
torch.save(
165166
_concat_tuple(preds_list),

0 commit comments

Comments
 (0)