From 90085135c2a7518af8be844feb704362f611f491 Mon Sep 17 00:00:00 2001 From: Mark Daoust <markdaoust@google.com> Date: Thu, 21 Mar 2019 11:20:40 -0700 Subject: [PATCH] Update error message for "allow_nonexistent_arrays". This flag doesn't exist in the public interface, and the team considers hitting this message to be a bug that should be fixed. PiperOrigin-RevId: 239634541 --- tensorflow/lite/toco/toco_convert_test.cc | 3 +-- tensorflow/lite/toco/tooling_util.cc | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tensorflow/lite/toco/toco_convert_test.cc b/tensorflow/lite/toco/toco_convert_test.cc index 739b924607e..f430df6791c 100644 --- a/tensorflow/lite/toco/toco_convert_test.cc +++ b/tensorflow/lite/toco/toco_convert_test.cc @@ -63,8 +63,7 @@ TEST(TocoTest, BadOutputArray) { EXPECT_DEATH(Convert(input, toco_flags, model_flags, &output).ok(), "Specified output array .output1. is not produced by any op " - "in this graph. Is it a typo. To silence this message, pass " - "this flag: allow_nonexistent_arrays"); + "in this graph. Is it a typo"); } TEST(TocoTest, BadOutputFormat) { diff --git a/tensorflow/lite/toco/tooling_util.cc b/tensorflow/lite/toco/tooling_util.cc index 25ea8f53c5f..1503c741b30 100644 --- a/tensorflow/lite/toco/tooling_util.cc +++ b/tensorflow/lite/toco/tooling_util.cc @@ -904,8 +904,9 @@ void CheckNonExistentIOArrays(const Model& model) { return; } static constexpr char general_comment[] = - "Is it a typo? To silence this message, pass this flag: " - "allow_nonexistent_arrays"; + "Is it a typo? This should not happen. If you trigger this error " + "please send a bug report (with code to reporduce this error), to the " + "TensorFlow Lite team."; for (const string& output_array : model.flags.output_arrays()) { if (IsConstantParameterArray(model, output_array)) { continue; // It is OK to request that a constant be an output.