Commit f1f0bbbf authored by mxx's avatar mxx

1

parent 18dbee01
This diff is collapsed.
......@@ -179,7 +179,7 @@ for i in pre_slotad_cvr_good_old.index:
key = pre_slotad_cvr_good_old.ix[i, 'key']
value = pre_slotad_cvr_good_old.ix[i, 'value']
pipe.set(key, value, ex=200)
if i % 2000 == 0:
if i % 5000 == 0:
pipe.execute()
print(i)
time.sleep(0.5)
......@@ -189,8 +189,8 @@ pipe.execute()
for i in pre_slotad_cvr_good.index:
key = pre_slotad_cvr_good.ix[i, 'key']
value = pre_slotad_cvr_good.ix[i, 'value']
pipe.set(key, value, ex=90000)
if i % 2000 == 0:
pipe.set(key, value, ex=432000)
if i % 5000 == 0:
pipe.execute()
print(i)
time.sleep(0.5)
......@@ -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:
key = stat_slotad_cvr_good_old.ix[i, 'key']
value = stat_slotad_cvr_good_old.ix[i, 'value']
pipe.set(key, value, ex=200)
pipe.set(key, value, ex=600)
if i % 2000 == 0:
pipe.execute()
print(i)
......@@ -299,7 +299,7 @@ pipe.execute()
for i in stat_slotad_cvr_good.index:
key = stat_slotad_cvr_good.ix[i, 'key']
value = stat_slotad_cvr_good.ix[i, 'value']
pipe.set(key, value, ex=187200)
pipe.set(key, value, ex=432000)
if i % 5000 == 0:
pipe.execute()
print(i)
......
import redis
import json
params_dict={
#recommend方法
'startFacter':0.5,'cpaBiasRatioFacter':1.0,
'cpaOrientRatioFacter':0.5,
'cpaBiasThresholdFacter':2.0,
'cpcTargetRatioFacter':0.5,
'cpcOrientRatioFacter':0.01,
'cpcBiasThresholdFacter':1.0,
#熔断
'fuseOrientCostG1dFacter':50000.0,
'fuseOrientCostConvertbiasFacter':2.0,
#白名单参数
'wSlotOrientationConfidenceFacter':0.2,
'wSlotOrientationCostConvertBiasFacter':1.2,
#高置信黑名单参数
'bOrientConfidenceFacter1':1.0,
'bOrientCostConvertbiasFacter1':1.2,
'bSlotOrientationConfidenceFacter1':0.5,
'bSlotOrientationCostConvertBiasFacter1':3.5,
#低置信黑名单参数
'bOrientConfidenceFacter2':1.0,
'bOrientCostConvertbiasFacter2':1.5,
'bSlotOrientationConfidenceFacter2':0.5,
'bSlotOrientRadioFacter2':2.0,
"feedBackParams": {
"bOrientConfidenceFactor1": 1,
"bOrientConfidenceFactor2": 1,
"bOrientCostConvertBiasFactor1": 1.2,
"bOrientCostConvertBiasFactor2": 1.5,
"bSlotOrientRadioFactor2": 2,
"bSlotOrientationConfidenceFactor1": 0.5,
"bSlotOrientationConfidenceFactor2": 0.5,
"bSlotOrientationCostConvertBiasFactor1": 3.5,
"fuseOrientCostConvertBiasFactor": 2,
"fuseOrientCostG1dFactor": 50000,
"wSlotOrientationConfidenceFactor": 0.2,
"wSlotOrientationCostConvertBiasFactor": 1.2
},
"slotRecommendParams": {
"cpaBiasRatioFactor": 1,
"cpaBiasThresholdFactor": 2,
"cpaOrientRatioFactor": 0.6,
"cpcBiasThresholdFactor": 1,
"cpcOrientRatioFactor": 0.1,
"cpcTargetRatioFactor": 0.5,
"startFactor": 0.5
}
}
params_key="NZ_K??_auto_manage_params"
params_key="NZ_K86_trusteeship_params"
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment