Search in sources :

Example 1 with MatrixFormat

use of com.tencent.angel.model.output.format.MatrixFormat in project angel by Tencent.

the class PSModelIOExecutor method loadMatrix.

private void loadMatrix(PSMatrixLoadContext loadContext) throws IOException {
    ServerMatrix matrix = context.getMatrixStorageManager().getMatrix(loadContext.getMatrixId());
    if (matrix != null) {
        MatrixFormat format = ModelFilesUtils.initFormat(loadContext.getFormatClassName(), context.getConf());
        format.load(matrix, loadContext, context.getConf());
    }
}
Also used : ServerMatrix(com.tencent.angel.ps.storage.matrix.ServerMatrix) MatrixFormat(com.tencent.angel.model.output.format.MatrixFormat)

Example 2 with MatrixFormat

use of com.tencent.angel.model.output.format.MatrixFormat in project angel by Tencent.

the class PSModelIOExecutor method saveMatrix.

private void saveMatrix(PSMatrixSaveContext saveContext) throws IOException {
    ServerMatrix matrix = context.getMatrixStorageManager().getMatrix(saveContext.getMatrixId());
    if (matrix != null) {
        MatrixFormat format = ModelFilesUtils.initFormat(saveContext.getFormatClassName(), context.getConf());
        format.save(matrix, saveContext, context.getConf());
    }
}
Also used : ServerMatrix(com.tencent.angel.ps.storage.matrix.ServerMatrix) MatrixFormat(com.tencent.angel.model.output.format.MatrixFormat)

Aggregations

MatrixFormat (com.tencent.angel.model.output.format.MatrixFormat)2 ServerMatrix (com.tencent.angel.ps.storage.matrix.ServerMatrix)2