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
77149a6e
Commit
77149a6e
authored
Sep 05, 2019
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改rerank文件每次写入的数量
parent
1ffd2520
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
6 deletions
+26
-6
rerank_esmm.py
eda/esmm/Model_pipline/rerank_esmm.py
+0
-3
monitor.py
monitor.py
+26
-3
No files found.
eda/esmm/Model_pipline/rerank_esmm.py
View file @
77149a6e
...
...
@@ -204,9 +204,6 @@ if __name__ == "__main__":
df
=
df
.
rename
(
columns
=
{
0
:
"device_id"
,
1
:
"city_id"
,
2
:
"native_queue"
,
3
:
"nearby_queue"
,
4
:
"nation_queue"
,
5
:
"megacity_queue"
,
6
:
"time"
})
print
(
"df numbers"
)
print
(
df
.
shape
[
0
])
to_data_base
(
df
)
...
...
monitor.py
View file @
77149a6e
...
...
@@ -200,8 +200,6 @@ def make_data(device_id,city_id,key_head):
r
.
hset
(
name
=
key
,
key
=
"nation_queue"
,
value
=
nation
)
r
.
hset
(
name
=
key
,
key
=
"megacity_queue"
,
value
=
megacity
)
print
(
r
.
hgetall
(
key
))
if
__name__
==
"__main__"
:
native
=
","
.
join
([
str
(
i
)
for
i
in
(
range
(
100
,
102
))])
nearby
=
","
.
join
([
str
(
i
)
for
i
in
(
range
(
102
,
106
))])
nation
=
","
.
join
([
str
(
i
)
for
i
in
(
range
(
106
,
110
))])
...
...
@@ -209,10 +207,35 @@ if __name__ == "__main__":
key_head
=
"device_diary_queue_rerank:device_id:"
# key_head = "device_diary_queue:device_id:"
device_id
=
"868663038800471"
make_data
(
device_id
,
"beijing"
,
key_head
)
#
make_data(device_id, "beijing", key_head)
# device_id = "868663038800476"
city_id
=
"beijing"
if
__name__
==
"__main__"
:
users_list
=
list
(
range
(
1
,
90
))
n
=
3
split_users_list
=
[
users_list
[
i
:
i
+
n
]
for
i
in
range
(
0
,
len
(
users_list
),
n
)]
for
child_users_list
in
split_users_list
:
total_samples
=
list
()
for
uid_city
in
child_users_list
:
# tag_list = get_user_profile(uid_city[0])
# queues = get_queues(uid_city[0], uid_city[1])
# if len(queues) > 0 and len(tag_list) > 0:
# new_native = tag_boost(queues[0], tag_list)
# new_nearby = tag_boost(queues[1], tag_list)
#
# insert_time = str(datetime.datetime.now().strftime('%Y%m%d%H%M'))
# sample = [uid_city[0], uid_city[1], new_native, new_nearby, queues[2], queues[3], insert_time]
total_samples
.
append
(
uid_city
)
if
len
(
total_samples
)
>
0
:
df
=
pd
.
DataFrame
(
total_samples
)
df
=
df
.
rename
(
columns
=
{
0
:
"device_id"
})
print
(
"df numbers"
)
print
(
df
.
shape
[
0
])
# to_data_base(df)
...
...
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