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
35e4d3f4
Commit
35e4d3f4
authored
Jun 19, 2020
by
段英荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改冷启动队列
parent
bcee7ce9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
new_tag3_cold_start.py
eda/smart_rank/new_tag3_cold_start.py
+10
-11
No files found.
eda/smart_rank/new_tag3_cold_start.py
View file @
35e4d3f4
...
...
@@ -150,11 +150,7 @@ def get_es_diary(keywords, city_tag_id=-1, version=False):
"terms"
:
{
"content_level"
:
[
6
,
5
,
4
,
3.5
,
3
]
}
}],
"should"
:
should_list
,
"minimum_should_match"
:
1
}]
}
}
q
[
"sort"
]
=
sort_list
...
...
@@ -301,19 +297,22 @@ if __name__ == "__main__":
redis_client
=
redis
.
StrictRedis
.
from_url
(
"redis://:ReDis!GmTx*0aN9@172.16.40.173:6379"
)
"""
tractate_list = get_es_tractate(keywords)
answer_list = get_es_answer(keywords)
redis_client.rpush("doris:tag_v3:coldstart:tractate", *tractate_list)
redis_client.rpush("doris:tag_v3:coldstart:answer", *answer_list)
"""
all_city_tag_id
=
get_all_city_id
()
for
city_id
in
all_city_tag_id
:
if
city_id
!=
-
1
:
diary_list
=
get_es_diary
(
keywords
,
city_id
)
redis_client
.
rpush
(
"doris:tag_v3:coldstart:diary:"
+
str
(
city_id
),
*
diary_list
)
#
all_city_tag_id = get_all_city_id()
#
for city_id in all_city_tag_id:
#
if city_id != -1:
#
diary_list = get_es_diary(keywords, city_id)
#
redis_client.rpush("doris:tag_v3:coldstart:diary:" + str(city_id), *diary_list)
diary_list
=
get_es_diary
(
keywords
)
redis_client
.
rpush
(
"doris:tag_v3:coldstart:diary:-1"
,
*
diary_list
)
print
(
diary_list
)
#redis_client.rpush("doris:tag_v3:coldstart:diary:-1", *diary_list)
# print("diary: " + str(len(diary_list)))
# print("tractate: " + str(len(tractate_list)))
...
...
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