Explorar o código

feat:添加模型分本地保存逻辑

zhaohaipeng hai 8 meses
pai
achega
a0dbeb628d
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      model/model_predict_analyse.py

+ 3 - 3
model/model_predict_analyse.py

@@ -135,16 +135,16 @@ def predict_local_save_for_auc(old_df: pd.DataFrame, new_df: pd.DataFrame):
     d = {"old": old_df, "new": new_df}
     for key in d:
         df = d[key][['label', "score"]]
-        df.to_csv(f"{PREDICT_CACHE_PATH}/{key}_1.csv", index=False, header=False)
+        df.to_csv(f"{PREDICT_CACHE_PATH}/{key}_1.csv", sep="\t", index=False, header=False)
         df = d[key][['label', "score_2"]]
-        df.to_csv(f"{PREDICT_CACHE_PATH}/{key}_2.csv", index=False, header=False)
+        df.to_csv(f"{PREDICT_CACHE_PATH}/{key}_2.csv", sep="\t", index=False, header=False)
 
 
 def _main(old_predict_path: str, new_predict_path: str, calibration_file: str, analyse_file: str):
     old_df, old_group_df, old_segment_df = read_and_calibration_predict(old_predict_path)
     new_df, new_group_df, new_segment_df = read_and_calibration_predict(new_predict_path)
 
-    predict_local_save_for_auc(old_df, new_df)
+    # predict_local_save_for_auc(old_df, new_df)
 
     # 分段文件保存, 此处保留的最后使用的分段文件,不是所有的分段
     new_segment_df.to_csv(calibration_file, sep='\t', index=False, header=False)