Browse Source

Merge branch 'update-2022122408' into test

liqian 2 năm trước cách đây
mục cha
commit
d0994544c1
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      ad_user_video_predict.py

+ 4 - 1
ad_user_video_predict.py

@@ -1,5 +1,5 @@
 import datetime
-
+import sys
 import numpy as np
 import pandas as pd
 from odps import ODPS
@@ -84,6 +84,9 @@ def predict_ad_group_video(dt, config_key, config_param):
     video_df = video_df[video_df['videoid'] != -1]
     log_.info(f"video_df count = {len(video_df)}")
 
+    if len(group_df) == 0 or len(video_df):
+        sys.exit(1)
+
     predict_df = video_df
     all_group_data = []
     for index, item in group_df.iterrows():