Search in sources :

Example 1 with GetCheckpointsResponse

use of com.tencent.angel.protobuf.generated.PSMasterServiceProtos.GetCheckpointsResponse in project angel by Tencent.

the class MasterService method getCheckpointResults.

/**
 * Get checkpoint results
 */
@Override
public GetCheckpointsResponse getCheckpointResults(RpcController controller, GetCheckpointsRequest request) throws ServiceException {
    LOG.info("Get checkpoint result request=" + request);
    List<SaveResult> results = context.getModelSaver().getCheckpointResults(request.getMatrixId());
    if (results == null || results.isEmpty()) {
        return GetCheckpointsResponse.getDefaultInstance();
    }
    GetCheckpointsResponse.Builder builder = GetCheckpointsResponse.newBuilder();
    for (SaveResult result : results) {
        builder.addSaveResults(ProtobufUtil.convert(result));
    }
    return builder.build();
}
Also used : GetCheckpointsResponse(com.tencent.angel.protobuf.generated.PSMasterServiceProtos.GetCheckpointsResponse) SaveResult(com.tencent.angel.master.matrix.committer.SaveResult) PSMatricesSaveResult(com.tencent.angel.model.PSMatricesSaveResult) ModelSaveResult(com.tencent.angel.model.ModelSaveResult)

Aggregations

SaveResult (com.tencent.angel.master.matrix.committer.SaveResult)1 ModelSaveResult (com.tencent.angel.model.ModelSaveResult)1 PSMatricesSaveResult (com.tencent.angel.model.PSMatricesSaveResult)1 GetCheckpointsResponse (com.tencent.angel.protobuf.generated.PSMasterServiceProtos.GetCheckpointsResponse)1