|
@@ -64,7 +64,7 @@ class OnlineLearningTrainerXgb:
|
|
|
|
|
|
self._pipeline_original = joblib.load(path_model)
|
|
|
self._pipeline_optimized = joblib.load(path_model)
|
|
|
- print(f"model load from【{path_model}】success.")
|
|
|
+ print(f"pipeline load from【{path_model}】success.")
|
|
|
path_model = os.path.join(path, FileEnum.MODEL_XGB.value)
|
|
|
if os.path.isfile(path_model):
|
|
|
model = xgb.XGBClassifier()
|
|
@@ -95,7 +95,7 @@ class OnlineLearningTrainerXgb:
|
|
|
# pipeline = make_pmml_pipeline(self.model)
|
|
|
sklearn2pmml(self._pipeline_optimized, path_pmml, with_repr=True, )
|
|
|
self._f_rewrite_pmml(path_pmml)
|
|
|
- print(f"model save to【{path_pmml}】success. ")
|
|
|
+ print(f"pmml save to【{path_pmml}】success. ")
|
|
|
# pmml与原生模型结果一致性校验
|
|
|
model_pmml = Model.fromFile(path_pmml)
|
|
|
prob_pmml = model_pmml.predict(data)["probability(1)"]
|
|
@@ -314,7 +314,7 @@ class OnlineLearningTrainerXgb:
|
|
|
|
|
|
path_model = self._ol_config.f_get_save_path(FileEnum.PIPELINE_XGB.value)
|
|
|
joblib.dump(self._pipeline_optimized, path_model)
|
|
|
- print(f"model save to【{path_model}】success. ")
|
|
|
+ print(f"pipeline save to【{path_model}】success. ")
|
|
|
# 在xgb的增量学习下直接保存pipeline会出错,所以这里需要单独保存xgb model,然后进行复原
|
|
|
# path_model = self._ol_config.f_get_save_path(FileEnum.MODEL_XGB.value)
|
|
|
# self.model_optimized.save_model(path_model)
|