|
@@ -194,7 +194,7 @@ def predict(app_type_list):
|
|
|
h_timer_check(app_type=app_type)
|
|
|
|
|
|
|
|
|
-def predict_test(app_type_list):
|
|
|
+def predict_test(app_type_list, count):
|
|
|
now_date = datetime.datetime.today()
|
|
|
now_h = datetime.datetime.now().hour
|
|
|
log_.info(f"now_date = {datetime.datetime.strftime(now_date, '%Y%m%d%H')}, now_h = {now_h}")
|
|
@@ -209,7 +209,7 @@ def predict_test(app_type_list):
|
|
|
|
|
|
for app_type in app_type_list:
|
|
|
log_.info(f"app_type = {app_type}")
|
|
|
- videos_temp = random.sample(filtered_videos, 300)
|
|
|
+ videos_temp = random.sample(filtered_videos, count)
|
|
|
redis_data_temp = {}
|
|
|
csv_data_temp = []
|
|
|
for video_id in videos_temp:
|
|
@@ -235,7 +235,7 @@ if __name__ == '__main__':
|
|
|
log_.info(f'appType: {app_type_list} predict start...')
|
|
|
predict_start = time.time()
|
|
|
if env in ['dev', 'test']:
|
|
|
- predict_test(app_type_list=app_type_list)
|
|
|
+ predict_test(app_type_list=app_type_list, count=300)
|
|
|
elif env in ['pre', 'pro']:
|
|
|
predict(app_type_list=app_type_list)
|
|
|
else:
|