MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / FromGrpcStatus

Function FromGrpcStatus

tensorflow/core/distributed_runtime/rpc/grpc_util.h:83–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83inline Status FromGrpcStatus(const ::grpc::Status& s) {
84 if (s.ok()) {
85 return Status::OK();
86 } else {
87 // Convert "UNKNOWN" stream removed errors into unavailable, to allow
88 // for retry upstream.
89 if (IsStreamRemovedError(s)) {
90 return Status(tensorflow::error::UNAVAILABLE, s.error_message());
91 }
92 return Status(static_cast<tensorflow::error::Code>(s.error_code()),
93 s.error_message());
94 }
95}
96
97inline ::grpc::Status ToGrpcStatus(const ::tensorflow::Status& s) {
98 if (s.ok()) {

Callers 15

ParseMessageMethod · 0.85
GetRemoteAddressMethod · 0.85
MakeRPCFunction · 0.85
ProfileFunction · 0.85
NewSessionFunction · 0.85
MonitorFunction · 0.85
CreateSessionMethod · 0.85
ExtendSessionMethod · 0.85
RunStepMethod · 0.85
CloseSessionMethod · 0.85
ResetMethod · 0.85
TEST_FFunction · 0.85

Calls 4

IsStreamRemovedErrorFunction · 0.85
error_codeMethod · 0.80
StatusClass · 0.50
okMethod · 0.45

Tested by 6

CreateSessionMethod · 0.68
ExtendSessionMethod · 0.68
RunStepMethod · 0.68
CloseSessionMethod · 0.68
ResetMethod · 0.68
TEST_FFunction · 0.68