Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
ffm-baseline
Project
Project
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ML
ffm-baseline
Commits
7fbd8061
Commit
7fbd8061
authored
Nov 25, 2019
by
高雅喆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
回答的新smart rank灰度
parent
8fb46926
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
gm_feed_cold_start.py
eda/smart_rank/gm_feed_cold_start.py
+16
-6
No files found.
eda/smart_rank/gm_feed_cold_start.py
View file @
7fbd8061
...
...
@@ -111,12 +111,19 @@ def search_topic_by_match_phrase(tag_names):
return
topic_list
def
search_qa_by_match_phrase
(
tag_names
):
sort_list
=
[
{
'has_picture'
:
{
'order'
:
'desc'
}},
{
"good_click"
:
{
"order"
:
"desc"
}},
{
'smart_rank'
:
{
'order'
:
'desc'
}}
]
def
search_qa_by_match_phrase
(
tag_names
,
version
=
0
):
if
version
:
sort_list
=
[
{
'has_picture'
:
{
'order'
:
'desc'
}},
{
"good_click"
:
{
"order"
:
"desc"
}},
{
'smart_rank_v2'
:
{
'order'
:
'desc'
}}
]
else
:
sort_list
=
[
{
'has_picture'
:
{
'order'
:
'desc'
}},
{
"good_click"
:
{
"order"
:
"desc"
}},
{
'smart_rank'
:
{
'order'
:
'desc'
}}
]
q
=
dict
()
total_query_should_list
=
[]
for
tag_name
in
tag_names
:
...
...
@@ -157,6 +164,7 @@ if __name__ == "__main__":
# hot_search_word_diary_queue_key = "coldstart:hot:search:word:diary:queue"
light_clinic_beauty_topic_queue_key
=
"coldstart:light:clinic:beauty:topic:queue"
light_clinic_beauty_qa_queue_key
=
"coldstart:light:clinic:beauty:qa:queue"
light_clinic_beauty_qa_queue_grey_key
=
"coldstart:light:clinic:beauty:qa:queue:grey"
light_clinic_beauty_diary_queue_key
=
"coldstart:light:clinic:beauty:diary:queue"
light_clinic_beauty_diary_queue_key2
=
"coldstart:light:clinic:beauty:diary:queue:offline:score:v1"
card_types
=
[
'topic'
,
'qa'
]
# 日记有400多个城市,且是hmset,因此不用重置
...
...
@@ -202,7 +210,9 @@ if __name__ == "__main__":
print
(
"轻医美词更新的帖子队列长度:
%
s"
%
str
(
len
(
light_clinic_beauty_topic_queue
)))
light_clinic_beauty_qa_queue
=
search_qa_by_match_phrase
(
light_clinic_beauty
)
light_clinic_beauty_qa_grey_queue
=
search_qa_by_match_phrase
(
light_clinic_beauty
,
version
=
1
)
redis_client
.
rpush
(
light_clinic_beauty_qa_queue_key
,
*
light_clinic_beauty_qa_queue
)
redis_client
.
rpush
(
light_clinic_beauty_qa_queue_grey_key
,
*
light_clinic_beauty_qa_grey_queue
)
print
(
"轻医美词更新的问答队列长度:
%
s"
%
str
(
len
(
light_clinic_beauty_qa_queue
)))
for
city_tag_id
in
all_city_tag_id
:
...
...
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