fix: fix a bug in ensemble test script (#713)

* fix a bug in ensemble test script

* fix

* add a comment
This commit is contained in:
Yuante Li
2025-03-20 17:35:39 +08:00
committed by GitHub
parent 613121ca45
commit 0624ed180f
@@ -22,10 +22,11 @@ def print_preds_info(model_name, data_type, preds):
else:
print(f"Model {model_name} {data_type} predictions shape: {preds.shape}")
print("Showing a preview of the predictions (first few entries only):")
if isinstance(preds, (pd.DataFrame, pd.Series)):
print(preds.head())
elif isinstance(preds, (np.ndarray, torch.Tensor, tf.Tensor)):
print(pd.DataFrame(preds).head())
print(preds[:2])
elif isinstance(preds, list):
print(pd.DataFrame(preds[:5]))
else: