Populate more error messages to the users.
PiperOrigin-RevId: 299445320 Change-Id: Ia0d02c25ac3254444f7293d60c912989ad77ee3c
This commit is contained in:
parent
317189e108
commit
beabfbcfa6
@ -97,8 +97,8 @@ Status Profile(const string& service_addr, const string& logdir,
|
||||
FromGrpcStatus(stub->Profile(&context, request, &response)));
|
||||
|
||||
if (!response.empty_trace()) {
|
||||
TF_CHECK_OK(SaveTensorboardProfile(logdir, session_id, request.host_name(),
|
||||
response, &std::cout));
|
||||
TF_RETURN_IF_ERROR(SaveTensorboardProfile(
|
||||
logdir, session_id, request.host_name(), response, &std::cout));
|
||||
// Print this at the end so that it's not buried in irrelevant LOG messages.
|
||||
std::cout
|
||||
<< "NOTE: using the trace duration " << duration_ms << "ms.\n"
|
||||
|
||||
@ -70,16 +70,15 @@ class ProfilerSessionWrapper {
|
||||
tensorflow::Status status;
|
||||
status = session_->CollectData(&xspace);
|
||||
session_.reset();
|
||||
if (!status.ok()) {
|
||||
tensorflow::MaybeRaiseRegisteredFromStatus(status);
|
||||
return;
|
||||
}
|
||||
tensorflow::MaybeRaiseRegisteredFromStatus(status);
|
||||
|
||||
tensorflow::ProfileResponse response;
|
||||
tensorflow::ProfileRequest request = MakeProfileRequest(
|
||||
logdir_, tensorflow::profiler::GetCurrentTimeStampAsString(),
|
||||
tensorflow::port::Hostname());
|
||||
tensorflow::profiler::ConvertXSpaceToProfileResponse(xspace, request,
|
||||
&response);
|
||||
status = tensorflow::profiler::ConvertXSpaceToProfileResponse(
|
||||
xspace, request, &response);
|
||||
tensorflow::MaybeRaiseRegisteredFromStatus(status);
|
||||
|
||||
std::stringstream ss; // Record LOG messages.
|
||||
status = tensorflow::profiler::SaveTensorboardProfile(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user