Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tuia-alg-engineering-py
Project
Project
Details
Activity
Releases
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
mengxiangxuan
tuia-alg-engineering-py
Commits
f1f0bbbf
Commit
f1f0bbbf
authored
Oct 29, 2018
by
mxx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
18dbee01
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
166 deletions
+85
-166
candidate_set.py
auto-spread/auto_manage/candidate_set.py
+52
-133
candidate_set_temp.py
auto-spread/auto_manage/candidate_set_temp.py
+5
-5
params.py
auto-spread/auto_manage/params.py
+28
-28
No files found.
auto-spread/auto_manage/candidate_set.py
View file @
f1f0bbbf
This diff is collapsed.
Click to expand it.
auto-spread/auto_manage/candidate_set_temp.py
View file @
f1f0bbbf
...
@@ -179,7 +179,7 @@ for i in pre_slotad_cvr_good_old.index:
...
@@ -179,7 +179,7 @@ for i in pre_slotad_cvr_good_old.index:
key
=
pre_slotad_cvr_good_old
.
ix
[
i
,
'key'
]
key
=
pre_slotad_cvr_good_old
.
ix
[
i
,
'key'
]
value
=
pre_slotad_cvr_good_old
.
ix
[
i
,
'value'
]
value
=
pre_slotad_cvr_good_old
.
ix
[
i
,
'value'
]
pipe
.
set
(
key
,
value
,
ex
=
200
)
pipe
.
set
(
key
,
value
,
ex
=
200
)
if
i
%
2
000
==
0
:
if
i
%
5
000
==
0
:
pipe
.
execute
()
pipe
.
execute
()
print
(
i
)
print
(
i
)
time
.
sleep
(
0.5
)
time
.
sleep
(
0.5
)
...
@@ -189,8 +189,8 @@ pipe.execute()
...
@@ -189,8 +189,8 @@ pipe.execute()
for
i
in
pre_slotad_cvr_good
.
index
:
for
i
in
pre_slotad_cvr_good
.
index
:
key
=
pre_slotad_cvr_good
.
ix
[
i
,
'key'
]
key
=
pre_slotad_cvr_good
.
ix
[
i
,
'key'
]
value
=
pre_slotad_cvr_good
.
ix
[
i
,
'value'
]
value
=
pre_slotad_cvr_good
.
ix
[
i
,
'value'
]
pipe
.
set
(
key
,
value
,
ex
=
90
000
)
pipe
.
set
(
key
,
value
,
ex
=
432
000
)
if
i
%
2
000
==
0
:
if
i
%
5
000
==
0
:
pipe
.
execute
()
pipe
.
execute
()
print
(
i
)
print
(
i
)
time
.
sleep
(
0.5
)
time
.
sleep
(
0.5
)
...
@@ -288,7 +288,7 @@ stat_slotad_cvr_good_old.to_csv('stat_slotad_cvr_good_old.csv', index=False)
...
@@ -288,7 +288,7 @@ stat_slotad_cvr_good_old.to_csv('stat_slotad_cvr_good_old.csv', index=False)
for
i
in
stat_slotad_cvr_good_old
.
index
:
for
i
in
stat_slotad_cvr_good_old
.
index
:
key
=
stat_slotad_cvr_good_old
.
ix
[
i
,
'key'
]
key
=
stat_slotad_cvr_good_old
.
ix
[
i
,
'key'
]
value
=
stat_slotad_cvr_good_old
.
ix
[
i
,
'value'
]
value
=
stat_slotad_cvr_good_old
.
ix
[
i
,
'value'
]
pipe
.
set
(
key
,
value
,
ex
=
2
00
)
pipe
.
set
(
key
,
value
,
ex
=
6
00
)
if
i
%
2000
==
0
:
if
i
%
2000
==
0
:
pipe
.
execute
()
pipe
.
execute
()
print
(
i
)
print
(
i
)
...
@@ -299,7 +299,7 @@ pipe.execute()
...
@@ -299,7 +299,7 @@ pipe.execute()
for
i
in
stat_slotad_cvr_good
.
index
:
for
i
in
stat_slotad_cvr_good
.
index
:
key
=
stat_slotad_cvr_good
.
ix
[
i
,
'key'
]
key
=
stat_slotad_cvr_good
.
ix
[
i
,
'key'
]
value
=
stat_slotad_cvr_good
.
ix
[
i
,
'value'
]
value
=
stat_slotad_cvr_good
.
ix
[
i
,
'value'
]
pipe
.
set
(
key
,
value
,
ex
=
1872
00
)
pipe
.
set
(
key
,
value
,
ex
=
4320
00
)
if
i
%
5000
==
0
:
if
i
%
5000
==
0
:
pipe
.
execute
()
pipe
.
execute
()
print
(
i
)
print
(
i
)
...
...
auto-spread/auto_manage/params.py
View file @
f1f0bbbf
import
redis
import
redis
import
json
import
json
params_dict
=
{
params_dict
=
{
#recommend方法
"feedBackParams"
:
{
'startFacter'
:
0.5
,
'cpaBiasRatioFacter'
:
1.0
,
"bOrientConfidenceFactor1"
:
1
,
'cpaOrientRatioFacter'
:
0.5
,
"bOrientConfidenceFactor2"
:
1
,
'cpaBiasThresholdFacter'
:
2.0
,
"bOrientCostConvertBiasFactor1"
:
1.2
,
'cpcTargetRatioFacter'
:
0.5
,
"bOrientCostConvertBiasFactor2"
:
1.5
,
'cpcOrientRatioFacter'
:
0.01
,
"bSlotOrientRadioFactor2"
:
2
,
'cpcBiasThresholdFacter'
:
1.0
,
"bSlotOrientationConfidenceFactor1"
:
0.5
,
"bSlotOrientationConfidenceFactor2"
:
0.5
,
#熔断
"bSlotOrientationCostConvertBiasFactor1"
:
3.5
,
'fuseOrientCostG1dFacter'
:
50000.0
,
"fuseOrientCostConvertBiasFactor"
:
2
,
'fuseOrientCostConvertbiasFacter'
:
2.0
,
"fuseOrientCostG1dFactor"
:
50000
,
#白名单参数
"wSlotOrientationConfidenceFactor"
:
0.2
,
'wSlotOrientationConfidenceFacter'
:
0.2
,
"wSlotOrientationCostConvertBiasFactor"
:
1.2
'wSlotOrientationCostConvertBiasFacter'
:
1.2
,
},
#高置信黑名单参数
"slotRecommendParams"
:
{
'bOrientConfidenceFacter1'
:
1.0
,
"cpaBiasRatioFactor"
:
1
,
'bOrientCostConvertbiasFacter1'
:
1.2
,
"cpaBiasThresholdFactor"
:
2
,
'bSlotOrientationConfidenceFacter1'
:
0.5
,
"cpaOrientRatioFactor"
:
0.6
,
'bSlotOrientationCostConvertBiasFacter1'
:
3.5
,
"cpcBiasThresholdFactor"
:
1
,
#低置信黑名单参数
"cpcOrientRatioFactor"
:
0.1
,
'bOrientConfidenceFacter2'
:
1.0
,
"cpcTargetRatioFactor"
:
0.5
,
'bOrientCostConvertbiasFacter2'
:
1.5
,
"startFactor"
:
0.5
'bSlotOrientationConfidenceFacter2'
:
0.5
,
}
'bSlotOrientRadioFacter2'
:
2.0
,
}
}
params_key
=
"NZ_K86_trusteeship_params"
params_key
=
"NZ_K??_auto_manage_params"
params_value
=
json
.
dumps
(
params_dict
)
params_value
=
json
.
dumps
(
params_dict
)
pool
=
redis
.
ConnectionPool
(
host
=
'r-bp18da0abeaddc94285.redis.rds.aliyuncs.com'
,
password
=
'hteK73Zxx3ji9LGCy2jBAZDJ6'
,
port
=
6379
,
db
=
0
)
r
=
redis
.
Redis
(
connection_pool
=
pool
)
r
.
set
(
params_key
,
params_value
)
\ No newline at end of file
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