Browse Source

fix user_h

yangxiaohui 1 year ago
parent
commit
fcb76a99af
1 changed files with 2 additions and 2 deletions
  1. 2 2
      get_ad_out_sample_v2_user.py

+ 2 - 2
get_ad_out_sample_v2_user.py

@@ -217,7 +217,7 @@ from candidate_user
     data.fillna('', inplace=True)
     model_key = 'ad_out_v2_model_v1.day'
     lr_model = LrModel('model/{}.json'.format(model_key))
-    item_h_dict = {}
+    user_h_dict = {}
     k_col = 'u_id'
     dt = datetime
     key_name = f"{config_.KEY_NAME_PREFIX_AD_OUT_MODEL_SCORE_USER}{model_key}:{dt}"
@@ -231,5 +231,5 @@ from candidate_user
         # print(item_h)
     redis_helper.add_data_with_zset(key_name=key_name, data=user_h_dict, expire_time=2 * 24 * 3600)
     with open('{}.json'.format(key_name), 'w') as fout:
-        json.dump(item_h_dict, fout, indent=2, ensure_ascii=False, sort_keys=True)
+        json.dump(user_h_dict, fout, indent=2, ensure_ascii=False, sort_keys=True)