Browse Source

feat:添加评估结果分析脚本

zhaohaipeng 6 tháng trước cách đây
mục cha
commit
c69cee52dc
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      ad/model_predict_analyse.py

+ 3 - 3
ad/model_predict_analyse.py

@@ -4,11 +4,11 @@ import gzip
 
 from hdfs import InsecureClient
 
-client = InsecureClient("http://master-1-1.c-7f31a3eea195cb73.cn-hangzhou.emr.aliyuncs.com:9870")
+client = InsecureClient("http://master-1-1.c-7f31a3eea195cb73.cn-hangzhou.emr.aliyuncs.com:9870", user="root")
 
 
 def read_predict(hdfs_path):
-    for file in client.list(hdfs_path):
+    for file in client.list("/dw/recommend/model/34_ad_predict_data/20241004_351_0927_1003_1000/"):
         with client.read(file, encoding="utf-8") as reador:
             with gzip.GzipFile(fileobj=reador, mode="rb") as gz_file:
                 content = gz_file.read().decode("utf-8")
@@ -16,7 +16,7 @@ def read_predict(hdfs_path):
 
 
 def _main():
-    read_predict("/dw/recommend/model/34_ad_predict_data/20241004_351_0927_1003_1000")
+    read_predict("")
 
 
 if __name__ == '__main__':