liqian 2 年之前
父節點
當前提交
ef0f3abec3
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      ad_threshold_auto_update.py

+ 4 - 1
ad_threshold_auto_update.py

@@ -84,7 +84,10 @@ def get_threshold_record_new_by_uv(ad_abtest_abcode_config, feature_df, threshol
                 continue
             update_range = threshold_update_mapping.get(ab_test_group)
             # 获取对应组的当前uv
-            current_uv = temp_df[temp_df['分组'] == ab_test_group]['广告uv'].values[0]
+            try:
+                current_uv = temp_df[temp_df['分组'] == ab_test_group]['广告uv'].values[0]
+            except Exception as e:
+                continue
             # 计算uv差值
             uv_differ = current_uv - target_uv
             if abs(uv_differ) < not_update: