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();
}
Aggregations