From a3e3b3a16c77ef800568c2d8e7cc3ef26f68658d Mon Sep 17 00:00:00 2001 From: Michael Ekstrand Date: Tue, 24 Dec 2024 15:35:08 -0600 Subject: [PATCH] finish fixing HPF tests --- lenskit-hpf/tests/test_hpf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lenskit-hpf/tests/test_hpf.py b/lenskit-hpf/tests/test_hpf.py index a4b085ca7..1c96b5a42 100644 --- a/lenskit-hpf/tests/test_hpf.py +++ b/lenskit-hpf/tests/test_hpf.py @@ -44,7 +44,7 @@ def test_hpf_train_large(tmp_path, ml_ratings): pipe = topn_pipeline(algo) pipe.train(ds, retrain=False) - for u in np.random.choice(ratings.user.unique(), size=50, replace=False): + for u in np.random.choice(ratings.user_id.unique(), size=50, replace=False): recs = pipe.run("recommender", query=u, n=50) assert isinstance(recs, ItemList) assert len(recs) == 50 @@ -73,7 +73,7 @@ def test_hpf_train_binary(tmp_path, ml_ratings): pipe = topn_pipeline(algo) pipe.train(ds, retrain=False) - for u in np.random.choice(ratings.user.unique(), size=50, replace=False): + for u in np.random.choice(ratings.user_id.unique(), size=50, replace=False): recs = pipe.run("recommender", query=u, n=50) assert isinstance(recs, ItemList) assert len(recs) == 50