Skip to content

Commit c1e3f9f

Browse files
committed
[DeepRec] Enable INFERENCE_MODE=1 in serving.
Signed-off-by: Tao Peng <[email protected]>
1 parent d3a6e43 commit c1e3f9f

File tree

1 file changed

+6
-0
lines changed
  • tensorflow_serving/model_servers

1 file changed

+6
-0
lines changed

tensorflow_serving/model_servers/main.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ limitations under the License.
5656
int main(int argc, char** argv) {
5757
tensorflow::serving::main::Server::Options options;
5858
bool display_version = false;
59+
60+
// Enable INFERENCE_MODE by default
61+
if (setenv("INFERENCE_MODE", "1", 1) != 0) {
62+
std::cout << "Set env INFERENCE_MODE=1 error.\n";
63+
}
64+
5965
std::vector<tensorflow::Flag> flag_list = {
6066
tensorflow::Flag("port", &options.grpc_port,
6167
"Port to listen on for gRPC API"),

0 commit comments

Comments
 (0)