Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
morningsky committed May 22, 2022
1 parent e5b46bf commit 1f9aaed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@
<img src='https://img.shields.io/badge/scikit_learn-0.23.2+-brightgreen'>
<img src='https://img.shields.io/badge/pandas-1.0.5+-brightgreen'>
<img src="https://img.shields.io/pypi/l/torch-rechub">
<img src='https://img.shields.io/badge/annoy-1.17.0-brightgreen'>
<img src="https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fmorningsky%2FTorch-RecHub%2F&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false)](https://hits.seeyoufarm.com">


A Lighting Pytorch Framework for Recommendation Models, Easy-to-use and Easy-to-extend.

## 安装

```python
#稳定版
pip install torch-rechub
#最新版
git clone https://github.com/morningsky/Torch-RecHub.git
```

## 主要特性
Expand Down
2 changes: 1 addition & 1 deletion examples/run_movielens.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def main(dataset_path, model_name, epoch, learning_rate, batch_size, weight_deca
print("matching for topk")
user_map, item_map = np.load("./data/ml-1m/saved/raw_id_maps.npy", allow_pickle=True)
match_res = collections.defaultdict(dict)
topk = 100
topk = 10
for user_id, user_emb in zip(test_user_model_input["user_id"], user_embedding):
items_idx, items_scores = annoy.query(v=user_emb, n=topk) #the index of topk match items
match_res[user_map[user_id]] = all_item_model_input["movie_id"][items_idx]
Expand Down

0 comments on commit 1f9aaed

Please sign in to comment.