diff --git a/recommenders/models/lightfm/lightfm_utils.py b/recommenders/models/lightfm/lightfm_utils.py index 8acd9aed67..ee561e92d2 100644 --- a/recommenders/models/lightfm/lightfm_utils.py +++ b/recommenders/models/lightfm/lightfm_utils.py @@ -253,8 +253,8 @@ def prepare_all_predictions( all_predictions["prediction"] = all_predictions.apply( lambda x: model.predict( - user_ids=int(x["uid"]), - item_ids=[x["iid"]], + user_ids=np.array([x["uid"]], dtype=np.int32), + item_ids=np.array([x["iid"]], dtype=np.int32), user_features=user_features, item_features=item_features, num_threads=num_threads,