From 9c64ca7e795f2165995bcda7b8087b97a8392d80 Mon Sep 17 00:00:00 2001 From: Klein Hu Date: Fri, 19 Jul 2019 09:52:46 -0700 Subject: [PATCH 1/3] Update the build_dir --- tools/ci_build/github/linux/server_run_build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ci_build/github/linux/server_run_build.sh b/tools/ci_build/github/linux/server_run_build.sh index bad12b38a48f4..1aff867e46674 100755 --- a/tools/ci_build/github/linux/server_run_build.sh +++ b/tools/ci_build/github/linux/server_run_build.sh @@ -15,7 +15,7 @@ done if [ $BUILD_DEVICE = "gpu" ]; then _CUDNN_VERSION=$(echo $CUDNN_VERSION | cut -d. -f1-2) - python3 $SCRIPT_DIR/../../build.py --build_dir /home/onnxruntimedev \ + python3 $SCRIPT_DIR/../../build.py --build_dir /build \ --config Debug Release \ --skip_submodule_sync --enable_onnx_tests \ --parallel --build_shared_lib \ @@ -24,7 +24,7 @@ done --cudnn_home /usr/local/cudnn-$_CUDNN_VERSION/cuda --build_shared_lib $BUILD_EXTR_PAR /home/onnxruntimedev/Release/onnx_test_runner -e cuda /data/onnx else - python3 $SCRIPT_DIR/../../build.py --build_dir /home/onnxruntimedev \ + python3 $SCRIPT_DIR/../../build.py --build_dir /build \ --skip_submodule_sync \ --parallel $BUILD_EXTR_PAR # /home/onnxruntimedev/Release/onnx_test_runner /data/onnx From 4105af44dfc3095322526e601d568ed33b59e3bf Mon Sep 17 00:00:00 2001 From: Klein Hu Date: Fri, 19 Jul 2019 10:32:43 -0700 Subject: [PATCH 2/3] Fix indent in the model_zoo_tests.py --- .../server/integration_tests/model_zoo_tests.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/onnxruntime/test/server/integration_tests/model_zoo_tests.py b/onnxruntime/test/server/integration_tests/model_zoo_tests.py index 56a815cff5127..8f1e79d5aba72 100644 --- a/onnxruntime/test/server/integration_tests/model_zoo_tests.py +++ b/onnxruntime/test/server/integration_tests/model_zoo_tests.py @@ -70,13 +70,13 @@ def __test_model(self, model_path, data_paths): test_util.pb_response_validation(self, resp, os.path.join(test, 'response.pb')) test_util.test_log('[{0}] GRPC testing ....'.format(model_path)) - uri = ("{}:{}".format(self.server_ip, self.grpc_port)) - with open(os.path.join(test, 'request.pb'), 'rb') as f: - request_payload = f.read() - with grpc.insecure_channel(uri) as channel: - stub = prediction_service_pb2_grpc.PredictionServiceStub(channel) - resp = stub.Predict(request_payload) - test_util.pb_response_validation(self, resp, os.path.join(test, 'response.pb')) + uri = ("{}:{}".format(self.server_ip, self.grpc_port)) + with open(os.path.join(test, 'request.pb'), 'rb') as f: + request_payload = f.read() + with grpc.insecure_channel(uri) as channel: + stub = prediction_service_pb2_grpc.PredictionServiceStub(channel) + resp = stub.Predict(request_payload) + test_util.pb_response_validation(self, resp, os.path.join(test, 'response.pb')) finally: test_util.shutdown_server_app(server_app_proc, self.server_off_in_seconds) From 6b709a7e489607eb6b82ae0e061e9f7db3f2c5dd Mon Sep 17 00:00:00 2001 From: Klein Hu Date: Fri, 19 Jul 2019 15:28:58 -0700 Subject: [PATCH 3/3] Remove unnecessary tests in the server build. --- tools/ci_build/github/linux/server_run_build.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/ci_build/github/linux/server_run_build.sh b/tools/ci_build/github/linux/server_run_build.sh index 1aff867e46674..9ca7ccd3b9ec2 100755 --- a/tools/ci_build/github/linux/server_run_build.sh +++ b/tools/ci_build/github/linux/server_run_build.sh @@ -22,10 +22,8 @@ done --use_cuda --use_openmp \ --cuda_home /usr/local/cuda \ --cudnn_home /usr/local/cudnn-$_CUDNN_VERSION/cuda --build_shared_lib $BUILD_EXTR_PAR - /home/onnxruntimedev/Release/onnx_test_runner -e cuda /data/onnx else python3 $SCRIPT_DIR/../../build.py --build_dir /build \ --skip_submodule_sync \ --parallel $BUILD_EXTR_PAR - # /home/onnxruntimedev/Release/onnx_test_runner /data/onnx fi \ No newline at end of file