use of com.tencent.angel.client.AngelClient in project angel by Tencent.
the class GetValueOfIndexSubmmiter method submit.
@Override
public void submit(Configuration conf) throws Exception {
AngelClient client = AngelClientFactory.get(conf);
int feaNum = conf.getInt(MLConf.ML_FEATURE_NUM(), MLConf.DEFAULT_ML_FEATURE_NUM());
MatrixContext dMat = new MatrixContext(DENSE_DOUBLE_MAT, 1, feaNum, -1, -1);
dMat.setRowType(RowType.T_DOUBLE_DENSE);
dMat.set(MatrixConf.MATRIX_AVERAGE, "true");
MatrixContext sMat = new MatrixContext(SPARSE_DOUBLE_MAT, 1, feaNum, -1, -1);
sMat.setRowType(RowType.T_DOUBLE_SPARSE);
sMat.set(MatrixConf.MATRIX_AVERAGE, "true");
MatrixContext lMat = new MatrixContext(LONG_SPARSE_DOUBLE_MAT, 1, feaNum, -1, -1);
lMat.setRowType(RowType.T_DOUBLE_SPARSE_LONGKEY);
lMat.set(MatrixConf.MATRIX_AVERAGE, "true");
client.addMatrix(dMat);
client.addMatrix(sMat);
client.addMatrix(lMat);
client.startPSServer();
client.run();
client.waitForCompletion();
client.stop(0);
}
use of com.tencent.angel.client.AngelClient in project angel by Tencent.
the class GBDTLocalExample method train.
public void train() throws Exception {
setConf();
GBDTRunner runner = new GBDTRunner();
runner.train(conf);
AngelClient angelClient = AngelClientFactory.get(conf);
angelClient.stop();
}
use of com.tencent.angel.client.AngelClient in project angel by Tencent.
the class SparseDoubleSubmit method submit.
@Override
public void submit(Configuration conf) throws Exception {
conf.setBoolean(AngelConf.ANGEL_AM_USE_DUMMY_DATASPLITER, true);
AngelClient angelClient = AngelClientFactory.get(conf);
int blockCol = conf.getInt("blockcol", 5000000);
MatrixContext context = new MatrixContext("sparse_double_test", 1, 2100000000, 1, blockCol);
context.setRowType(RowType.T_DOUBLE_SPARSE);
angelClient.addMatrix(context);
angelClient.startPSServer();
angelClient.run();
angelClient.waitForCompletion();
angelClient.stop(0);
}
use of com.tencent.angel.client.AngelClient in project angel by Tencent.
the class GBDTTest method train.
private void train() throws Exception {
try {
// Submit GBDT Train Task
conf.set(AngelConf.ANGEL_TRAIN_DATA_PATH, trainInputPath);
conf.set(AngelConf.ANGEL_SAVE_MODEL_PATH, LOCAL_FS + TMP_PATH + "/model");
GBDTRunner runner = new GBDTRunner();
runner.train(conf);
AngelClient angelClient = AngelClientFactory.get(conf);
angelClient.stop();
} catch (Exception x) {
LOG.error("run train failed ", x);
throw x;
}
}
Aggregations