Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ydl_ai_recommender
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
闫发泽
ydl_ai_recommender
Commits
b0845767
Commit
b0845767
authored
Jan 11, 2023
by
柴鹏飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新说明文档
parent
c83f87aa
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
2 deletions
+25
-2
README.md
README.md
+25
-2
No files found.
README.md
View file @
b0845767
...
...
@@ -29,9 +29,12 @@ conda env create --file environment.yaml
# 1. 从数据库中拉取最新数据到本地
python bin/update.py
-t
load_db_data
# 2. 构建
相关特征、索引信息
# 2. 构建
用户向量
python bin/update.py
-t
make_embedding
# 3. 构建相关索引
python bin/update.py
-t
make_index
```
### 启动接口服务
...
...
@@ -39,7 +42,24 @@ python bin/update.py -t make_embedding
```
bash
# 一定要在 `bin` 目录中执行
cd
bin
sh start.sh
sh start_a.sh
```
### 更新模型
为了保证线上服务的稳定性,使用nginx做负载均衡,在更新模型接口时,需要先启动新的服务,验证无问题后结束原有的服务。
由于线上只有一台服务器,因此将服务端口设置为 A/B 两组,若当前服务是A组的,则启动B组,验证B组服务无问题,关闭A组服务,具体的执行操作如下:
```
# bin 目录中
# 启动服务,启动后相关接口服务的pid会记录在 `start_service_version_b.pid` 文件中
./start_b.sh
# 关闭A组服务,根据启动时保存的pid,kill掉,结束后会将保存pid的文件删除
./stop_a.sh
# 也可查看相关进程服务情况
ps aux | grep recommend_service
```
...
...
@@ -47,6 +67,9 @@ sh start.sh
```
bash
python bin/test.py
# 更多相关操作,使用 --help 查看
# 相关细节见代码注释
```
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment