Skip to content

Commit af3064a

Browse files
authored
Merge pull request #20 from shanshanpt/features/serving_inference_mode
[DeepRec] Enable INFERENCE_MODE=1 in serving.
2 parents d3a6e43 + c1e3f9f commit af3064a

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)