From e3919d3fcecbdd80f017f8176d4d5435d05a4d38 Mon Sep 17 00:00:00 2001 From: Scott McKay Date: Thu, 4 Jul 2019 13:10:29 +1000 Subject: [PATCH] Cleanup naming of test input to use .onnx for models. (#1337) * Cleanup naming of test input to use .onnx for models. * Remove file deleted on master --- docs/python/examples/plot_pipeline.py | 2 +- docs/python/examples/plot_profiling.py | 2 +- .../python/datasets/{mul_1.pb => mul_1.onnx} | Bin onnxruntime/test/framework/float_16_test.cc | 2 +- .../test/framework/inference_session_test.cc | 6 ++-- .../framework/local_kernel_registry_test.cc | 8 ++--- onnxruntime/test/ir/graph_test.cc | 8 ++--- onnxruntime/test/providers/memcpy_test.cc | 2 +- .../test/python/onnxruntime_test_python.py | 34 +++++++++--------- .../python/onnxruntime_test_python_backend.py | 2 +- .../test/server/unit_tests/executor_test.cc | 2 +- .../unit_tests/server_configuration_test.cc | 10 +++--- onnxruntime/test/shared_lib/test_inference.cc | 6 ++-- .../test/shared_lib/test_model_loading.cc | 2 +- .../{LabelEncoder.pb => LabelEncoder.onnx} | Bin .../{conv_autopad.pb => conv_autopad.onnx} | Bin .../test/testdata/{foo_1.pb => foo_1.onnx} | Bin .../test/testdata/{foo_2.pb => foo_2.onnx} | Bin .../{fuse_mul_1.pb => fuse_mul_1.onnx} | Bin onnxruntime/test/testdata/gru_1.pb | Bin 314 -> 0 bytes ...dentity_string.pb => identity_string.onnx} | 0 .../{logicaland.pb => logicaland.onnx} | 0 onnxruntime/test/testdata/lstm_1.onnx | Bin 356 -> 0 bytes .../testdata/{matmul_1.pb => matmul_1.onnx} | Bin .../testdata/{matmul_2.pb => matmul_2.onnx} | Bin .../test/testdata/model_optional_inputs.pb | Bin 226 -> 0 bytes .../{mul_1.pb.noopset => mul_1.noopset.onnx} | Bin .../test/testdata/{mul_1.pb => mul_1.onnx} | Bin .../test/testdata/{mul_16.pb => mul_16.onnx} | Bin .../{optional_1.pb => optional_1.onnx} | Bin .../test/testdata/{pyop_1.pb => pyop_1.onnx} | 0 .../test/testdata/{scan_1.pb => scan_1.onnx} | Bin ...p_int64float.pb => zipmap_int64float.onnx} | Bin ...stringfloat.pb => zipmap_stringfloat.onnx} | Bin onnxruntime/test/tvm/tvm_basic_test.cc | 2 +- setup.py | 2 +- 36 files changed, 45 insertions(+), 45 deletions(-) rename onnxruntime/python/datasets/{mul_1.pb => mul_1.onnx} (100%) rename onnxruntime/test/testdata/{LabelEncoder.pb => LabelEncoder.onnx} (100%) rename onnxruntime/test/testdata/{conv_autopad.pb => conv_autopad.onnx} (100%) rename onnxruntime/test/testdata/{foo_1.pb => foo_1.onnx} (100%) rename onnxruntime/test/testdata/{foo_2.pb => foo_2.onnx} (100%) rename onnxruntime/test/testdata/{fuse_mul_1.pb => fuse_mul_1.onnx} (100%) delete mode 100644 onnxruntime/test/testdata/gru_1.pb rename onnxruntime/test/testdata/{identity_string.pb => identity_string.onnx} (100%) rename onnxruntime/test/testdata/{logicaland.pb => logicaland.onnx} (100%) delete mode 100644 onnxruntime/test/testdata/lstm_1.onnx rename onnxruntime/test/testdata/{matmul_1.pb => matmul_1.onnx} (100%) rename onnxruntime/test/testdata/{matmul_2.pb => matmul_2.onnx} (100%) delete mode 100644 onnxruntime/test/testdata/model_optional_inputs.pb rename onnxruntime/test/testdata/{mul_1.pb.noopset => mul_1.noopset.onnx} (100%) rename onnxruntime/test/testdata/{mul_1.pb => mul_1.onnx} (100%) rename onnxruntime/test/testdata/{mul_16.pb => mul_16.onnx} (100%) rename onnxruntime/test/testdata/{optional_1.pb => optional_1.onnx} (100%) rename onnxruntime/test/testdata/{pyop_1.pb => pyop_1.onnx} (100%) rename onnxruntime/test/testdata/{scan_1.pb => scan_1.onnx} (100%) rename onnxruntime/test/testdata/{zipmap_int64float.pb => zipmap_int64float.onnx} (100%) rename onnxruntime/test/testdata/{zipmap_stringfloat.pb => zipmap_stringfloat.onnx} (100%) diff --git a/docs/python/examples/plot_pipeline.py b/docs/python/examples/plot_pipeline.py index 5063479492..0a002f6223 100644 --- a/docs/python/examples/plot_pipeline.py +++ b/docs/python/examples/plot_pipeline.py @@ -21,7 +21,7 @@ That's the most simple way. """ from onnxruntime.datasets import get_example -example1 = get_example("mul_1.pb") +example1 = get_example("mul_1.onnx") import onnx model = onnx.load(example1) # model is a ModelProto protobuf message diff --git a/docs/python/examples/plot_profiling.py b/docs/python/examples/plot_profiling.py index 3844962033..d5617d4172 100644 --- a/docs/python/examples/plot_profiling.py +++ b/docs/python/examples/plot_profiling.py @@ -19,7 +19,7 @@ from onnxruntime.datasets import get_example ######################### # Let's load a very simple model and compute some prediction. -example1 = get_example("mul_1.pb") +example1 = get_example("mul_1.onnx") sess = rt.InferenceSession(example1) input_name = sess.get_inputs()[0].name diff --git a/onnxruntime/python/datasets/mul_1.pb b/onnxruntime/python/datasets/mul_1.onnx similarity index 100% rename from onnxruntime/python/datasets/mul_1.pb rename to onnxruntime/python/datasets/mul_1.onnx diff --git a/onnxruntime/test/framework/float_16_test.cc b/onnxruntime/test/framework/float_16_test.cc index 399ac6882d..c141ea817c 100644 --- a/onnxruntime/test/framework/float_16_test.cc +++ b/onnxruntime/test/framework/float_16_test.cc @@ -96,7 +96,7 @@ ONNX_NAMESPACE::OpSchema GetMulFP16Schema() { return schema; } -static const std::string MUL_MODEL_URI = "testdata/mul_16.pb"; +static const std::string MUL_MODEL_URI = "testdata/mul_16.onnx"; void RunSession(InferenceSession& session_object, RunOptions& run_options, diff --git a/onnxruntime/test/framework/inference_session_test.cc b/onnxruntime/test/framework/inference_session_test.cc index 256369684c..66e5f9c0bf 100644 --- a/onnxruntime/test/framework/inference_session_test.cc +++ b/onnxruntime/test/framework/inference_session_test.cc @@ -123,8 +123,8 @@ class FuseExecutionProvider : public IExecutionProvider { namespace test { static void VerifyOutputs(const std::vector& fetches, const std::vector& expected_dims, const std::vector& expected_values); -static const std::string MODEL_URI = "testdata/mul_1.pb"; -static const std::string MODEL_URI_NO_OPSET = "testdata/mul_1.pb.noopset"; +static const std::string MODEL_URI = "testdata/mul_1.onnx"; +static const std::string MODEL_URI_NO_OPSET = "testdata/mul_1.noopset.onnx"; //static const std::string MODEL_URI = "./testdata/squeezenet/model.onnx"; // TODO enable this after we've weights? static void CreateMatMulModel(std::unique_ptr& p_model, ProviderType provider_type) { @@ -1122,7 +1122,7 @@ TEST(ExecutionProviderTest, FunctionInlineTest) { TEST(InferenceSessionTests, TestTruncatedSequence) { // model/data generated by /onnxruntime/test/testdata/CNTK/gen.py GenScan() // Manually updated to have IR version of 4. - static const std::string LSTM_MODEL_URI = "testdata/scan_1.pb"; + static const std::string LSTM_MODEL_URI = "testdata/scan_1.onnx"; // This model is a 4x forward LSTM. Parse it to find out mapping between init_state input/output ONNX_NAMESPACE::ModelProto model_proto; int model_fd; diff --git a/onnxruntime/test/framework/local_kernel_registry_test.cc b/onnxruntime/test/framework/local_kernel_registry_test.cc index 7cd6d3b686..09352e92b0 100644 --- a/onnxruntime/test/framework/local_kernel_registry_test.cc +++ b/onnxruntime/test/framework/local_kernel_registry_test.cc @@ -184,11 +184,11 @@ OpKernel* CreateOptionalOpKernel(const OpKernelInfo& kernel_info) { return new OptionalOpKernel(kernel_info); } -static const std::string MUL_MODEL_URI = "testdata/mul_1.pb"; -static const std::string FOO_MODEL_URI = "testdata/foo_1.pb"; -static const std::string FOO_TRUNCATE_MODEL_URI = "testdata/foo_2.pb"; +static const std::string MUL_MODEL_URI = "testdata/mul_1.onnx"; +static const std::string FOO_MODEL_URI = "testdata/foo_1.onnx"; +static const std::string FOO_TRUNCATE_MODEL_URI = "testdata/foo_2.onnx"; -static const std::string OPTIONAL_MODEL1_URI = "testdata/optional_1.pb"; +static const std::string OPTIONAL_MODEL1_URI = "testdata/optional_1.onnx"; void RunSession(InferenceSession& session_object, RunOptions& run_options, diff --git a/onnxruntime/test/ir/graph_test.cc b/onnxruntime/test/ir/graph_test.cc index 992c88b7a3..70f2bfe306 100644 --- a/onnxruntime/test/ir/graph_test.cc +++ b/onnxruntime/test/ir/graph_test.cc @@ -322,9 +322,9 @@ TEST(ResolvingGraphTest, GraphConstruction_CheckIsAcyclic) { auto status = graph.Resolve(); EXPECT_TRUE(status.IsOK()) << status.ErrorMessage(); - EXPECT_TRUE(Model::Save(model, "graph_1.pb").IsOK()); + EXPECT_TRUE(Model::Save(model, "graph_1.onnx").IsOK()); std::shared_ptr model2; - EXPECT_TRUE(Model::Load("graph_1.pb", model2).IsOK()); + EXPECT_TRUE(Model::Load("graph_1.onnx", model2).IsOK()); auto model_proto = model.ToProto(); auto model_proto2 = model2->ToProto(); @@ -709,9 +709,9 @@ TEST(ResolvingGraphTest, GraphConstruction_TypeInference) { EXPECT_EQ("node_4_out_1", graph.GetOutputs()[0]->Name()); EXPECT_EQ(2, graph.GetInputs().size()); - EXPECT_TRUE(Model::Save(model, "model_x.pb").IsOK()); + EXPECT_TRUE(Model::Save(model, "model_x.onnx").IsOK()); std::shared_ptr loaded_model; - EXPECT_TRUE(Model::Load("model_x.pb", loaded_model).IsOK()); + EXPECT_TRUE(Model::Load("model_x.onnx", loaded_model).IsOK()); EXPECT_EQ(2, loaded_model->MainGraph().GetInputs().size()); auto& graph_proto = graph.ToGraphProto(); diff --git a/onnxruntime/test/providers/memcpy_test.cc b/onnxruntime/test/providers/memcpy_test.cc index 38f46ba4d4..e502a02724 100644 --- a/onnxruntime/test/providers/memcpy_test.cc +++ b/onnxruntime/test/providers/memcpy_test.cc @@ -32,7 +32,7 @@ TEST(MemcpyTest, copy1) { kernel_registry_manager.RegisterKernels(execution_providers); onnx::ModelProto mp; - std::ifstream model_istream("testdata/matmul_1.pb", std::ifstream::in | std::ifstream::binary); + std::ifstream model_istream("testdata/matmul_1.onnx", std::ifstream::in | std::ifstream::binary); google::protobuf::io::IstreamInputStream zero_copy_input(&model_istream); const bool result = mp.ParseFromZeroCopyStream(&zero_copy_input) && model_istream.eof(); ASSERT_TRUE(result); diff --git a/onnxruntime/test/python/onnxruntime_test_python.py b/onnxruntime/test/python/onnxruntime_test_python.py index 9bb4b3488f..72d763af7d 100644 --- a/onnxruntime/test/python/onnxruntime_test_python.py +++ b/onnxruntime/test/python/onnxruntime_test_python.py @@ -32,7 +32,7 @@ class TestInferenceSession(unittest.TestCase): np.testing.assert_allclose(output_expected, res[0], rtol=1e-05, atol=1e-08) def testRunModel(self): - sess = onnxrt.InferenceSession(self.get_name("mul_1.pb")) + sess = onnxrt.InferenceSession(self.get_name("mul_1.onnx")) x = np.array([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]], dtype=np.float32) input_name = sess.get_inputs()[0].name self.assertEqual(input_name, "X") @@ -47,7 +47,7 @@ class TestInferenceSession(unittest.TestCase): np.testing.assert_allclose(output_expected, res[0], rtol=1e-05, atol=1e-08) def testRunModelFromBytes(self): - with open(self.get_name("mul_1.pb"), "rb") as f: + with open(self.get_name("mul_1.onnx"), "rb") as f: content = f.read() sess = onnxrt.InferenceSession(content) x = np.array([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]], dtype=np.float32) @@ -64,7 +64,7 @@ class TestInferenceSession(unittest.TestCase): np.testing.assert_allclose(output_expected, res[0], rtol=1e-05, atol=1e-08) def testRunModel2(self): - sess = onnxrt.InferenceSession(self.get_name("matmul_1.pb")) + sess = onnxrt.InferenceSession(self.get_name("matmul_1.onnx")) x = np.array([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]], dtype=np.float32) input_name = sess.get_inputs()[0].name self.assertEqual(input_name, "X") @@ -82,7 +82,7 @@ class TestInferenceSession(unittest.TestCase): so = onnxrt.SessionOptions() so.session_log_verbosity_level = 1 so.session_logid = "MultiThreadsTest" - sess = onnxrt.InferenceSession(self.get_name("mul_1.pb"), sess_options=so) + sess = onnxrt.InferenceSession(self.get_name("mul_1.onnx"), sess_options=so) ro1 = onnxrt.RunOptions() ro1.run_tag = "thread1" t1 = threading.Thread(target=self.run_model, args = (sess, ro1)) @@ -99,7 +99,7 @@ class TestInferenceSession(unittest.TestCase): self.assertTrue('CPU' in device or 'GPU' in device) def testRunModelSymbolicInput(self): - sess = onnxrt.InferenceSession(self.get_name("matmul_2.pb")) + sess = onnxrt.InferenceSession(self.get_name("matmul_2.onnx")) x = np.array([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]], dtype=np.float32) input_name = sess.get_inputs()[0].name self.assertEqual(input_name, "X") @@ -116,7 +116,7 @@ class TestInferenceSession(unittest.TestCase): np.testing.assert_allclose(output_expected, res[0], rtol=1e-05, atol=1e-08) def testBooleanInputs(self): - sess = onnxrt.InferenceSession(self.get_name("logicaland.pb")) + sess = onnxrt.InferenceSession(self.get_name("logicaland.onnx")) a = np.array([[True, True], [False, False]], dtype=np.bool) b = np.array([[True, False], [True, False]], dtype=np.bool) @@ -148,7 +148,7 @@ class TestInferenceSession(unittest.TestCase): np.testing.assert_equal(output_expected, res[0]) def testStringInput1(self): - sess = onnxrt.InferenceSession(self.get_name("identity_string.pb")) + sess = onnxrt.InferenceSession(self.get_name("identity_string.onnx")) x = np.array(['this', 'is', 'identity', 'test'], dtype=np.str).reshape((2,2)) x_name = sess.get_inputs()[0].name @@ -169,7 +169,7 @@ class TestInferenceSession(unittest.TestCase): np.testing.assert_equal(x, res[0]) def testStringInput2(self): - sess = onnxrt.InferenceSession(self.get_name("identity_string.pb")) + sess = onnxrt.InferenceSession(self.get_name("identity_string.onnx")) x = np.array(['Olá', '你好', '여보세요', 'hello'], dtype=np.unicode).reshape((2,2)) x_name = sess.get_inputs()[0].name @@ -190,7 +190,7 @@ class TestInferenceSession(unittest.TestCase): np.testing.assert_equal(x, res[0]) def testInputBytes(self): - sess = onnxrt.InferenceSession(self.get_name("identity_string.pb")) + sess = onnxrt.InferenceSession(self.get_name("identity_string.onnx")) x = np.array([b'this', b'is', b'identity', b'test']).reshape((2,2)) x_name = sess.get_inputs()[0].name @@ -211,7 +211,7 @@ class TestInferenceSession(unittest.TestCase): np.testing.assert_equal(x, res[0].astype('|S8')) def testInputObject(self): - sess = onnxrt.InferenceSession(self.get_name("identity_string.pb")) + sess = onnxrt.InferenceSession(self.get_name("identity_string.onnx")) x = np.array(['this', 'is', 'identity', 'test'], object).reshape((2,2)) x_name = sess.get_inputs()[0].name @@ -232,7 +232,7 @@ class TestInferenceSession(unittest.TestCase): np.testing.assert_equal(x, res[0]) def testInputVoid(self): - sess = onnxrt.InferenceSession(self.get_name("identity_string.pb")) + sess = onnxrt.InferenceSession(self.get_name("identity_string.onnx")) x = np.array([b'this', b'is', b'identity', b'test'], np.void).reshape((2,2)) x_name = sess.get_inputs()[0].name @@ -256,7 +256,7 @@ class TestInferenceSession(unittest.TestCase): np.testing.assert_equal(expr, res[0]) def testConvAutoPad(self): - sess = onnxrt.InferenceSession(self.get_name("conv_autopad.pb")) + sess = onnxrt.InferenceSession(self.get_name("conv_autopad.onnx")) x = np.array(25 * [1.0], dtype=np.float32).reshape((1,1,5,5)) x_name = sess.get_inputs()[0].name @@ -282,7 +282,7 @@ class TestInferenceSession(unittest.TestCase): np.testing.assert_allclose(output_expected, res[0]) def testZipMapStringFloat(self): - sess = onnxrt.InferenceSession(self.get_name("zipmap_stringfloat.pb")) + sess = onnxrt.InferenceSession(self.get_name("zipmap_stringfloat.onnx")) x = np.array([1.0, 0.0, 3.0, 44.0, 23.0, 11.0], dtype=np.float32).reshape((2,3)) x_name = sess.get_inputs()[0].name @@ -301,7 +301,7 @@ class TestInferenceSession(unittest.TestCase): self.assertEqual(output_expected, res[0]) def testZipMapInt64Float(self): - sess = onnxrt.InferenceSession(self.get_name("zipmap_int64float.pb")) + sess = onnxrt.InferenceSession(self.get_name("zipmap_int64float.onnx")) x = np.array([1.0, 0.0, 3.0, 44.0, 23.0, 11.0], dtype=np.float32).reshape((2,3)) x_name = sess.get_inputs()[0].name @@ -320,7 +320,7 @@ class TestInferenceSession(unittest.TestCase): def testRaiseWrongNumInputs(self): with self.assertRaises(ValueError) as context: - sess = onnxrt.InferenceSession(self.get_name("logicaland.pb")) + sess = onnxrt.InferenceSession(self.get_name("logicaland.onnx")) a = np.array([[True, True], [False, False]], dtype=np.bool) res = sess.run([], {'input:0': a}) @@ -340,7 +340,7 @@ class TestInferenceSession(unittest.TestCase): def testProfilerWithSessionOptions(self): so = onnxrt.SessionOptions() so.enable_profiling = True - sess = onnxrt.InferenceSession(self.get_name("mul_1.pb"), sess_options=so) + sess = onnxrt.InferenceSession(self.get_name("mul_1.onnx"), sess_options=so) x = np.array([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]], dtype=np.float32) sess.run([], {'X': x}) profile_file = sess.end_profiling() @@ -399,7 +399,7 @@ class TestInferenceSession(unittest.TestCase): np.testing.assert_allclose(output_expected, res[0], rtol=1e-05, atol=1e-08) def testLabelEncoder(self): - sess = onnxrt.InferenceSession(self.get_name("LabelEncoder.pb")) + sess = onnxrt.InferenceSession(self.get_name("LabelEncoder.onnx")) input_name = sess.get_inputs()[0].name self.assertEqual(input_name, "input") input_type = str(sess.get_inputs()[0].type) diff --git a/onnxruntime/test/python/onnxruntime_test_python_backend.py b/onnxruntime/test/python/onnxruntime_test_python_backend.py index a2e6864f51..d1ed383cf8 100644 --- a/onnxruntime/test/python/onnxruntime_test_python_backend.py +++ b/onnxruntime/test/python/onnxruntime_test_python_backend.py @@ -29,7 +29,7 @@ class TestBackend(unittest.TestCase): raise FileNotFoundError("Unable to find '{0}' or '{1}' or '{2}'".format(name, rel, res)) def testRunModel(self): - name = self.get_name("mul_1.pb") + name = self.get_name("mul_1.onnx") rep = backend.prepare(name) x = np.array([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]], dtype=np.float32) res = rep.run(x) diff --git a/onnxruntime/test/server/unit_tests/executor_test.cc b/onnxruntime/test/server/unit_tests/executor_test.cc index 75ab5d6817..47a850eda7 100644 --- a/onnxruntime/test/server/unit_tests/executor_test.cc +++ b/onnxruntime/test/server/unit_tests/executor_test.cc @@ -14,7 +14,7 @@ namespace server { namespace test { TEST(ExecutorTests, TestMul_1) { - const static auto model_file = "testdata/mul_1.pb"; + const static auto model_file = "testdata/mul_1.onnx"; const static auto input_json = R"({"inputs":{"X":{"dims":[3,2],"dataType":1,"floatData":[1,2,3,4,5,6]}},"outputFilter":["Y"]})"; const static auto expected = R"({"outputs":{"Y":{"dims":["3","2"],"dataType":1,"floatData":[1,4,9,16,25,36]}}})"; diff --git a/onnxruntime/test/server/unit_tests/server_configuration_test.cc b/onnxruntime/test/server/unit_tests/server_configuration_test.cc index 77a979e27f..541763c475 100644 --- a/onnxruntime/test/server/unit_tests/server_configuration_test.cc +++ b/onnxruntime/test/server/unit_tests/server_configuration_test.cc @@ -13,7 +13,7 @@ namespace test { TEST(ConfigParsingTests, AllArgs) { char* test_argv[] = { const_cast("/path/to/binary"), - const_cast("--model_path"), const_cast("testdata/mul_1.pb"), + const_cast("--model_path"), const_cast("testdata/mul_1.onnx"), const_cast("--address"), const_cast("4.4.4.4"), const_cast("--http_port"), const_cast("80"), const_cast("--num_http_threads"), const_cast("1"), @@ -22,7 +22,7 @@ TEST(ConfigParsingTests, AllArgs) { onnxruntime::server::ServerConfiguration config{}; Result res = config.ParseInput(11, test_argv); EXPECT_EQ(res, Result::ContinueSuccess); - EXPECT_EQ(config.model_path, "testdata/mul_1.pb"); + EXPECT_EQ(config.model_path, "testdata/mul_1.onnx"); EXPECT_EQ(config.address, "4.4.4.4"); EXPECT_EQ(config.http_port, 80); EXPECT_EQ(config.num_http_threads, 1); @@ -32,13 +32,13 @@ TEST(ConfigParsingTests, AllArgs) { TEST(ConfigParsingTests, Defaults) { char* test_argv[] = { const_cast("/path/to/binary"), - const_cast("--model"), const_cast("testdata/mul_1.pb"), + const_cast("--model"), const_cast("testdata/mul_1.onnx"), const_cast("--num_http_threads"), const_cast("3")}; onnxruntime::server::ServerConfiguration config{}; Result res = config.ParseInput(5, test_argv); EXPECT_EQ(res, Result::ContinueSuccess); - EXPECT_EQ(config.model_path, "testdata/mul_1.pb"); + EXPECT_EQ(config.model_path, "testdata/mul_1.onnx"); EXPECT_EQ(config.address, "0.0.0.0"); EXPECT_EQ(config.http_port, 8001); EXPECT_EQ(config.num_http_threads, 3); @@ -82,7 +82,7 @@ TEST(ConfigParsingTests, WrongLoggingLevel) { char* test_argv[] = { const_cast("/path/to/binary"), const_cast("--log_level"), const_cast("not a logging level"), - const_cast("--model_path"), const_cast("testdata/mul_1.pb"), + const_cast("--model_path"), const_cast("testdata/mul_1.onnx"), const_cast("--address"), const_cast("4.4.4.4"), const_cast("--http_port"), const_cast("80"), const_cast("--num_http_threads"), const_cast("1")}; diff --git a/onnxruntime/test/shared_lib/test_inference.cc b/onnxruntime/test/shared_lib/test_inference.cc index 840ce0aed1..2833803ac9 100644 --- a/onnxruntime/test/shared_lib/test_inference.cc +++ b/onnxruntime/test/shared_lib/test_inference.cc @@ -114,10 +114,10 @@ void TestInference(Ort::Env& env, T model_uri, &value_y); } -static constexpr PATH_TYPE MODEL_URI = TSTR("testdata/mul_1.pb"); -static constexpr PATH_TYPE CUSTOM_OP_MODEL_URI = TSTR("testdata/foo_1.pb"); +static constexpr PATH_TYPE MODEL_URI = TSTR("testdata/mul_1.onnx"); +static constexpr PATH_TYPE CUSTOM_OP_MODEL_URI = TSTR("testdata/foo_1.onnx"); #ifdef ENABLE_LANGUAGE_INTEROP_OPS -static constexpr PATH_TYPE PYOP_FLOAT_MODEL_URI = TSTR("testdata/pyop_1.pb"); +static constexpr PATH_TYPE PYOP_FLOAT_MODEL_URI = TSTR("testdata/pyop_1.onnx"); #endif class CApiTestWithProvider : public CApiTest, diff --git a/onnxruntime/test/shared_lib/test_model_loading.cc b/onnxruntime/test/shared_lib/test_model_loading.cc index 4da741a7c6..151dabb7e2 100644 --- a/onnxruntime/test/shared_lib/test_model_loading.cc +++ b/onnxruntime/test/shared_lib/test_model_loading.cc @@ -170,7 +170,7 @@ TEST_F(CApiTest, model_with_external_data) { } TEST_F(CApiTest, model_from_array) { - const char* model_path = "testdata/matmul_1.pb"; + const char* model_path = "testdata/matmul_1.onnx"; std::vector buffer; { std::ifstream file(model_path, std::ios::binary | std::ios::ate); diff --git a/onnxruntime/test/testdata/LabelEncoder.pb b/onnxruntime/test/testdata/LabelEncoder.onnx similarity index 100% rename from onnxruntime/test/testdata/LabelEncoder.pb rename to onnxruntime/test/testdata/LabelEncoder.onnx diff --git a/onnxruntime/test/testdata/conv_autopad.pb b/onnxruntime/test/testdata/conv_autopad.onnx similarity index 100% rename from onnxruntime/test/testdata/conv_autopad.pb rename to onnxruntime/test/testdata/conv_autopad.onnx diff --git a/onnxruntime/test/testdata/foo_1.pb b/onnxruntime/test/testdata/foo_1.onnx similarity index 100% rename from onnxruntime/test/testdata/foo_1.pb rename to onnxruntime/test/testdata/foo_1.onnx diff --git a/onnxruntime/test/testdata/foo_2.pb b/onnxruntime/test/testdata/foo_2.onnx similarity index 100% rename from onnxruntime/test/testdata/foo_2.pb rename to onnxruntime/test/testdata/foo_2.onnx diff --git a/onnxruntime/test/testdata/fuse_mul_1.pb b/onnxruntime/test/testdata/fuse_mul_1.onnx similarity index 100% rename from onnxruntime/test/testdata/fuse_mul_1.pb rename to onnxruntime/test/testdata/fuse_mul_1.onnx diff --git a/onnxruntime/test/testdata/gru_1.pb b/onnxruntime/test/testdata/gru_1.pb deleted file mode 100644 index 1f2c684b306b6e183bab1605285f3ab244737f6d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 314 zcmWe)OU_8mD@n9k$;73@#TdcG7|z8Q#Kq_{XnqE{IZ>YrV9u%s@&&8dQnUa#4 z7hjxNl`6p`!~v94C`m0Y(X!=W&|X zrhUseZ|_y?@7Pzwxoz+M`rG^Dg(vQtbT-t^i7^~m`kW@+ZW3AfMNd9Pk*Cm=t;Zm#yJeYI{;?< BZBqaM diff --git a/onnxruntime/test/testdata/matmul_1.pb b/onnxruntime/test/testdata/matmul_1.onnx similarity index 100% rename from onnxruntime/test/testdata/matmul_1.pb rename to onnxruntime/test/testdata/matmul_1.onnx diff --git a/onnxruntime/test/testdata/matmul_2.pb b/onnxruntime/test/testdata/matmul_2.onnx similarity index 100% rename from onnxruntime/test/testdata/matmul_2.pb rename to onnxruntime/test/testdata/matmul_2.onnx diff --git a/onnxruntime/test/testdata/model_optional_inputs.pb b/onnxruntime/test/testdata/model_optional_inputs.pb deleted file mode 100644 index 638c87c14856b6a5dae66be597722c3222628ac4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 226 zcmd;Jwz|y7Wx&N4!NnNP#TdlJ=)}dq#UR8ODa0HZpCQGTm!FavZ>Yo^n z>RB-ev8NX$7G%U5Mu`Kp3JGxua4-t-a4~Uk0Wl*Gr+_5Fkt9HZOfZQcED}sn!a&P~ w__%n0MsYxmVM&ta0y;&EO9Ut=02G9o4>m4Ik_+TWG{eABPApsu0!$zb0DH+8A^-pY diff --git a/onnxruntime/test/testdata/mul_1.pb.noopset b/onnxruntime/test/testdata/mul_1.noopset.onnx similarity index 100% rename from onnxruntime/test/testdata/mul_1.pb.noopset rename to onnxruntime/test/testdata/mul_1.noopset.onnx diff --git a/onnxruntime/test/testdata/mul_1.pb b/onnxruntime/test/testdata/mul_1.onnx similarity index 100% rename from onnxruntime/test/testdata/mul_1.pb rename to onnxruntime/test/testdata/mul_1.onnx diff --git a/onnxruntime/test/testdata/mul_16.pb b/onnxruntime/test/testdata/mul_16.onnx similarity index 100% rename from onnxruntime/test/testdata/mul_16.pb rename to onnxruntime/test/testdata/mul_16.onnx diff --git a/onnxruntime/test/testdata/optional_1.pb b/onnxruntime/test/testdata/optional_1.onnx similarity index 100% rename from onnxruntime/test/testdata/optional_1.pb rename to onnxruntime/test/testdata/optional_1.onnx diff --git a/onnxruntime/test/testdata/pyop_1.pb b/onnxruntime/test/testdata/pyop_1.onnx similarity index 100% rename from onnxruntime/test/testdata/pyop_1.pb rename to onnxruntime/test/testdata/pyop_1.onnx diff --git a/onnxruntime/test/testdata/scan_1.pb b/onnxruntime/test/testdata/scan_1.onnx similarity index 100% rename from onnxruntime/test/testdata/scan_1.pb rename to onnxruntime/test/testdata/scan_1.onnx diff --git a/onnxruntime/test/testdata/zipmap_int64float.pb b/onnxruntime/test/testdata/zipmap_int64float.onnx similarity index 100% rename from onnxruntime/test/testdata/zipmap_int64float.pb rename to onnxruntime/test/testdata/zipmap_int64float.onnx diff --git a/onnxruntime/test/testdata/zipmap_stringfloat.pb b/onnxruntime/test/testdata/zipmap_stringfloat.onnx similarity index 100% rename from onnxruntime/test/testdata/zipmap_stringfloat.pb rename to onnxruntime/test/testdata/zipmap_stringfloat.onnx diff --git a/onnxruntime/test/tvm/tvm_basic_test.cc b/onnxruntime/test/tvm/tvm_basic_test.cc index 6852b39cad..32ac545484 100644 --- a/onnxruntime/test/tvm/tvm_basic_test.cc +++ b/onnxruntime/test/tvm/tvm_basic_test.cc @@ -303,7 +303,7 @@ static void RunSession(InferenceSession& session_object, ASSERT_EQ(found[i], values_y[i]); } -static const std::string MODEL_URI = "testdata/fuse_mul_1.pb"; +static const std::string MODEL_URI = "testdata/fuse_mul_1.onnx"; TEST(TVMTest, CodeGen_Demo_for_Fuse_Mul) { SessionOptions so; diff --git a/setup.py b/setup.py index 03321cb39a..d252bfef0e 100644 --- a/setup.py +++ b/setup.py @@ -139,7 +139,7 @@ if '--use_openvino' in sys.argv: sys.argv.remove('--use_openvino') # Additional examples -examples_names = ["mul_1.pb", "logreg_iris.onnx", "sigmoid.onnx"] +examples_names = ["mul_1.onnx", "logreg_iris.onnx", "sigmoid.onnx"] examples = [path.join('datasets', x) for x in examples_names] # Extra files such as EULA and ThirdPartyNotices