丁云鹏 8 months ago
parent
commit
fb2e2dd740

+ 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;