Selaa lähdekoodia

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

zhaohaipeng 6 kuukautta sitten
vanhempi
commit
d39cd19fb2
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      ad/model_predict_analyse.py

+ 2 - 2
ad/model_predict_analyse.py

@@ -9,8 +9,8 @@ client = InsecureClient("http://master-1-1.c-7f31a3eea195cb73.cn-hangzhou.emr.al
 
 def read_predict(hdfs_path: str):
     for file in client.list(hdfs_path):
-        with client.read(hdfs_path + file, encoding="utf-8") as reador:
-            with gzip.GzipFile(fileobj=reador, mode="rb") as gz_file:
+        with client.read(hdfs_path + file) as reader:
+            with gzip.GzipFile(fileobj=reader, mode="rb") as gz_file:
                 content = gz_file.read()
                 print(f"Content of {hdfs_path + file}:\n {content}")