Skip to content

Commit

Permalink
finish fixing HPF tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mdekstrand committed Dec 24, 2024
1 parent 79ad05f commit a3e3b3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lenskit-hpf/tests/test_hpf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit a3e3b3a

Please sign in to comment.