diff options
author | 2017-12-27 10:26:23 -0800 | |
---|---|---|
committer | 2017-12-27 10:30:07 -0800 | |
commit | baf6a0c183bb2897ff55ec884b1a6f26cc389bc2 (patch) | |
tree | 7ac5e3869f15fa0c61ab456885e99467f40215aa /tensorflow/core/protobuf | |
parent | 2bf95689e547690321c0c5ef237f7df391190b5c (diff) |
Optionally store the status code/message in the response
body for RunGraph and RunStep RPCs, to workaround the fact that the
RPC subsystem truncates long metadata messages.
PiperOrigin-RevId: 180203356
Diffstat (limited to 'tensorflow/core/protobuf')
-rw-r--r-- | tensorflow/core/protobuf/master.proto | 15 | ||||
-rw-r--r-- | tensorflow/core/protobuf/worker.proto | 17 |
2 files changed, 31 insertions, 1 deletions
diff --git a/tensorflow/core/protobuf/master.proto b/tensorflow/core/protobuf/master.proto index 6b25a86ba4..0437cb1b83 100644 --- a/tensorflow/core/protobuf/master.proto +++ b/tensorflow/core/protobuf/master.proto @@ -23,6 +23,7 @@ option java_package = "org.tensorflow.distruntime"; import "tensorflow/core/framework/device_attributes.proto"; import "tensorflow/core/framework/graph.proto"; +import "tensorflow/core/lib/core/error_codes.proto"; import "tensorflow/core/protobuf/config.proto"; import "tensorflow/core/protobuf/named_tensor.proto"; @@ -129,6 +130,13 @@ message RunStepRequest { // Partial run handle (optional). If specified, this will be a partial run // execution, run up to the specified fetches. string partial_run_handle = 6; + + // If true then some errors, e.g., execution errors that have long + // error messages, may return an OK RunStepResponse with the actual + // error saved in the status_code/status_error_message fields of the + // response body. This is a workaround since the RPC subsystem may + // truncate long metadata messages. + bool store_errors_in_response_body = 7; } message RunStepResponse { @@ -138,6 +146,13 @@ message RunStepResponse { // Returned metadata if requested in the options. RunMetadata metadata = 2; + + // If store_errors_in_response_body is true in the request, then + // optionally the server may return an OK status for the RPC and + // fill the true status into the fields below, to allow for messages + // that are too long to fit in metadata. + error.Code status_code = 3; + string status_error_message = 4; } //////////////////////////////////////////////////////////////////////////////// diff --git a/tensorflow/core/protobuf/worker.proto b/tensorflow/core/protobuf/worker.proto index 385e2dd163..9b51db1362 100644 --- a/tensorflow/core/protobuf/worker.proto +++ b/tensorflow/core/protobuf/worker.proto @@ -27,6 +27,7 @@ import "tensorflow/core/framework/step_stats.proto"; import "tensorflow/core/framework/device_attributes.proto"; import "tensorflow/core/framework/graph.proto"; import "tensorflow/core/framework/tensor.proto"; +import "tensorflow/core/lib/core/error_codes.proto"; import "tensorflow/core/protobuf/config.proto"; import "tensorflow/core/protobuf/debug.proto"; import "tensorflow/core/protobuf/named_tensor.proto"; @@ -226,7 +227,14 @@ message RunGraphRequest { // True if this is the last partial run request in a sequence of requests. bool is_last_partial_run = 7; - // Next: 9 + // If true then some errors, e.g., execution errors that have long + // error messages, may return an OK RunGraphResponse with the actual + // error saved in the status_code/status_error_message fields of the + // response body. This is a workaround since the RPC subsystem may + // truncate long metadata messages. + bool store_errors_in_response_body = 9; + + // Next: 10 } message RunGraphResponse { @@ -240,6 +248,13 @@ message RunGraphResponse { StepStats step_stats = 2; CostGraphDef cost_graph = 3; repeated GraphDef partition_graph = 4; + + // If store_errors_in_response_body is true in the request, then + // optionally the server may return an OK status for the RPC and + // fill the true status into the fields below, to allow for messages + // that are too long to fit in metadata. + error.Code status_code = 5; + string status_error_message = 6; } //////////////////////////////////////////////////////////////////////////////// |