use of ml.shifu.shifu.core.dtrain.dt.DTMasterParams in project shifu by ShifuML.
the class DTTest method testCamDtApp.
// @Test
public void testCamDtApp() throws IOException {
Properties props = new Properties();
props.setProperty(GuaguaConstants.MASTER_COMPUTABLE_CLASS, DTMaster.class.getName());
props.setProperty(GuaguaConstants.WORKER_COMPUTABLE_CLASS, DTWorker.class.getName());
props.setProperty(GuaguaConstants.GUAGUA_ITERATION_COUNT, "20");
props.setProperty(GuaguaConstants.GUAGUA_MASTER_RESULT_CLASS, DTMasterParams.class.getName());
props.setProperty(GuaguaConstants.GUAGUA_WORKER_RESULT_CLASS, DTWorkerParams.class.getName());
props.setProperty(CommonConstants.MODELSET_SOURCE_TYPE, "LOCAL");
props.setProperty(CommonConstants.SHIFU_MODEL_CONFIG, getClass().getResource("/test/config/ModelConfig.json").toString());
props.setProperty(CommonConstants.SHIFU_COLUMN_CONFIG, getClass().getResource("/test/config/ColumnConfig.json").toString());
props.setProperty(GuaguaConstants.GUAGUA_INPUT_DIR, getClass().getResource("/test/data/").toString());
GuaguaUnitDriver<DTMasterParams, DTWorkerParams> driver = new GuaguaMRUnitDriver<DTMasterParams, DTWorkerParams>(props);
driver.run();
}
use of ml.shifu.shifu.core.dtrain.dt.DTMasterParams in project shifu by ShifuML.
the class DTTest method testDtApp.
// @Test
public void testDtApp() throws IOException {
Properties props = new Properties();
props.setProperty(GuaguaConstants.MASTER_COMPUTABLE_CLASS, DTMaster.class.getName());
props.setProperty(GuaguaConstants.WORKER_COMPUTABLE_CLASS, DTWorker.class.getName());
props.setProperty(GuaguaConstants.GUAGUA_ITERATION_COUNT, "20");
props.setProperty(GuaguaConstants.GUAGUA_MASTER_RESULT_CLASS, DTMasterParams.class.getName());
props.setProperty(GuaguaConstants.GUAGUA_WORKER_RESULT_CLASS, DTWorkerParams.class.getName());
props.setProperty(CommonConstants.MODELSET_SOURCE_TYPE, "LOCAL");
props.setProperty(CommonConstants.SHIFU_MODEL_CONFIG, getClass().getResource("/test/config/ModelConfig.json").toString());
props.setProperty(CommonConstants.SHIFU_COLUMN_CONFIG, getClass().getResource("/test/config/ColumnConfig.json").toString());
props.setProperty(GuaguaConstants.GUAGUA_INPUT_DIR, getClass().getResource("/test/data/").toString());
GuaguaUnitDriver<DTMasterParams, DTWorkerParams> driver = new GuaguaMRUnitDriver<DTMasterParams, DTWorkerParams>(props);
driver.run();
}
Aggregations