Change deprecation_version field in api_def.proto to a string.
authorAnna R <annarev@google.com>
Mon, 7 May 2018 21:03:15 +0000 (14:03 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Tue, 8 May 2018 00:08:54 +0000 (17:08 -0700)
PiperOrigin-RevId: 195718061

tensorflow/core/framework/api_def.proto
tensorflow/core/framework/op_gen_lib.cc
tensorflow/core/framework/op_gen_lib_test.cc

index 98c38ef..e878ab6 100644 (file)
@@ -55,8 +55,10 @@ message ApiDef {
     // use a snake_case convention instead of CamelCase.
     string name = 1;
 
-    // First GraphDef version at which the op is disallowed.
-    int32 deprecation_version = 2;
+    // If this endpoint is deprecated, set deprecation_message to a
+    // message that should be logged when the endpoint is used.
+    // The message should indicate alternative endpoint to use, if any.
+    string deprecation_message = 2;
   }
   repeated Endpoint endpoint = 3;
 
index 5e14043..3d7920a 100644 (file)
@@ -306,9 +306,6 @@ void InitApiDefFromOpDef(const OpDef& op_def, ApiDef* api_def) {
 
   auto* endpoint = api_def->add_endpoint();
   endpoint->set_name(op_def.name());
-  if (op_def.has_deprecation()) {
-    endpoint->set_deprecation_version(op_def.deprecation().version());
-  }
 
   for (const auto& op_in_arg : op_def.input_arg()) {
     auto* api_in_arg = api_def->add_in_arg();
index 857b1c8..e0e77c7 100644 (file)
@@ -189,7 +189,6 @@ TEST(OpGenLibTest, ApiDefInitializedFromOpDef) {
 visibility: VISIBLE
 endpoint {
   name: "testop"
-  deprecation_version: 123
 }
 in_arg {
   name: "arg_a"