丁云鹏 8 달 전
부모
커밋
fb2e2dd740
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      ad-engine-commons/src/main/java/com/tzld/piaoquan/ad/engine/commons/score/model/XGBoostModel.java

+ 1 - 1
ad-engine-commons/src/main/java/com/tzld/piaoquan/ad/engine/commons/score/model/XGBoostModel.java

@@ -83,7 +83,7 @@ public class XGBoostModel extends Model {
     public boolean loadFromStream(InputStream in) throws Exception {
         String modelDir = PropertiesUtil.getString("model.xgboost.path");
         CompressUtil.decompressGzFile(in, modelDir);
-        String absolutePath =new File(rpath).getAbsolutePath();
+        String absolutePath =new File(modelDir).getAbsolutePath();
         XGBoostClassificationModel model2 = XGBoostClassificationModel.load("file://" + absolutePath);
         model2.setMissing(0.0f);
         this.model = model2;