Skip to content

Commit 5c53d1b

Browse files
authored
Merge pull request #422 from yinhaofeng/milvus
milvus
2 parents e2ed1d5 + 16f4962 commit 5c53d1b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

recserving/movie_recommender/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,23 +267,23 @@ score_pairs {
267267
1. 获得Recall所需模型
268268
`models/demo/movie_recommand`下分别执行
269269
```
270-
python3 -m paddlerec.run -m recall/user.yaml
271-
python3 -m paddlerec.run -m recall/movie.yaml
270+
python3 -u ../../../tools/static_trainer.py -m recall/movie.yaml
271+
python3 -u ../../../tools/static_trainer.py -m recall/user.yaml
272272
```
273273
训练好的user/movie模型首先需要参照[Paddle保存的预测模型转为Paddle Serving格式可部署的模型](https://github.com/PaddlePaddle/Serving/blob/develop/doc/INFERENCE_TO_SERVING_CN.md)
274274

275275
2. 获得用于milvus建库的电影向量文件
276-
`movie.yaml`训练所保存的模型可以用于生成全库的电影向量运行
276+
`movie.yaml`训练所保存的模型可以用于生成全库的电影向量。需要将数据 movie.dat 复制一份到 get_movie_vector.py 同一目录下,在运行的时候需要直接读取数据集。此外 serving_service 也需要和 get_movie_vector.py 放在同一级目录。运行
277277
```
278278
python3 get_movie_vectors.py
279279
```
280280
获得movie端embedding配送文件,该文件用于milvus建库。
281281

282-
注:user端的模型,直接用于`recall.py`的用户向量预测。
282+
注:user端的模型,直接用于`recall.py`的用户向量预测。
283283

284284
3. 获得rank模型
285285
`models/demo/movie_recommand`下执行
286286
```
287-
python3 -m paddlerec.run -m rank/config.yaml
287+
python3 -u ../../../tools/static_trainer.py -m rank/config.yaml
288288
```
289289
可以得到排序模型。转换成Serving格式可部署模型后,可以用于`rank.py`的排序模型。

0 commit comments

Comments
 (0)