def predict(self): self.set_conf() # Load Model from HDFS. tmp_path = tempfile.gettempdir() self.conf["gbdt.split.feature"] = tmp_path + "/out/xxx" self.conf["gbdt.split.value"] = tmp_path + "/out/xxx" runner = GBDTRunner() runner.predict(self.conf)
def predict(self): self.set_conf() # Load Model from HDFS. You can replace “/out/feature” and “out/value” with your prefer path tmp_path = tempfile.gettempdir() self.conf["gbdt.split.feature"] = tmp_path + "/out/feature" self.conf["gbdt.split.value"] = tmp_path + "/out/value" runner = GBDTRunner() runner.predict(conf)
def predict(self): self.set_conf() # Load Model from HDFS. TMP_PATH = tempfile.gettempdir() self.conf["gbdt.split.feature"] = TMP_PATH + "/out/xxx" self.conf["gbdt.split.value"] = TMP_PATH + "/out/xxx" runner = GBDTRunner() runner.predict(conf)
def train(self): self.set_conf() local_fs = LocalFileSystem.DEFAULT_FS tmp_path = tempfile.gettempdir() save_path = local_fs + tmp_path + "/model" log_path = local_fs + tmp_path + "/GBDTlog" input_path = "data/exampledata/GBDTLocalExampleData/agaricus.txt.train" output_path = "data/output" self.conf[AngelConf.ANGEL_TRAIN_DATA_PATH] = input_path self.conf[AngelConf.ANGEL_SAVE_MODEL_PATH] = output_path self.conf[AngelConf.ANGEL_SAVE_MODEL_PATH] = save_path # Set log path self.conf[AngelConf.ANGEL_LOG_PATH] = log_path # Set actionType train self.conf[AngelConf.ANGEL_ACTION_TYPE] = MLConf.ANGEL_ML_TRAIN runner = GBDTRunner() runner.train(self.conf)
def train(self): self.set_conf() runner = GBDTRunner() runner.train(self.conf)