Browse Source

Merge remote-tracking branch 'origin' into test

linfan 1 year ago
parent
commit
e4fc6a2958
2 changed files with 5 additions and 3 deletions
  1. 3 3
      config.py
  2. 2 0
      video_rank.py

+ 3 - 3
config.py

@@ -1326,7 +1326,7 @@ class DevelopmentConfig(BaseConfig):
     GET_USER_30DayReturnCnt_URL = 'http://videotest-internal.yishihui.com/longvideoapi/openapi/user/has30DayReturnCnt?mid='
 
     #tf serving url
-    TF_SERVING_URL = 'http://192.168.203.102:8501/v1/models/deepfm:predict'
+    TF_SERVING_URL = 'http://reco-rank-internal.piaoquantv.com/v1/models/deepfm:predict'
 
     # 日志服务配置
     ALIYUN_LOG = {
@@ -1384,7 +1384,7 @@ class TestConfig(BaseConfig):
     GET_USER_30DayReturnCnt_URL = 'http://videotest-internal.yishihui.com/longvideoapi/openapi/user/has30DayReturnCnt?mid='
 
     # tf serving url
-    TF_SERVING_URL = 'http://192.168.203.102:8501/v1/models/deepfm:predict'
+    TF_SERVING_URL = 'http://reco-rank-internal.piaoquantv.com/v1/models/deepfm:predict'
 
     # 日志服务配置
     ALIYUN_LOG = {
@@ -1500,7 +1500,7 @@ class ProductionConfig(BaseConfig):
     GET_USER_30DayReturnCnt_URL = 'http://longvideoapi-internal.piaoquantv.com/longvideoapi/openapi/user/has30DayReturnCnt?mid='
 
     # tf serving url
-    TF_SERVING_URL = 'http://192.168.203.102:8501/v1/models/deepfm:predict'
+    TF_SERVING_URL = 'http://reco-rank-internal.piaoquantv.com/v1/models/deepfm:predict'
 
     # 日志服务配置
     ALIYUN_LOG = {

+ 2 - 0
video_rank.py

@@ -627,6 +627,7 @@ def video_new_rank2(data, size, top_K, flow_pool_P, ab_code, mid, exp_config=Non
     recall_list = []
     rov_recall_rank = data['rov_pool_recall']
     #call rank service
+    #flag_call_service = 0
     if ab_code == 60066:
         feature_dict, recall_list = get_featurs(mid, data, size, top_K, flow_pool_P, env_dict)
         score_result = get_tf_serving_sores(feature_dict)
@@ -634,6 +635,7 @@ def video_new_rank2(data, size, top_K, flow_pool_P, ab_code, mid, exp_config=Non
             for i in range(len(score_result)):
                 recall_list[i]['sort_score'] = score_result[i][0]
                 #print(score_result[i][0])
+                recall_list[i]['flag_call_service'] = 1
             rov_recall_rank = sorted(recall_list, key=lambda k: k.get('sort_score', 0), reverse=True)
     else:
         redisObj = RedisHelper()