|
9 | 9 |
|
10 | 10 | TEST_F(ModelPredictTest, TestLoadPredictBaseHandler) {
|
11 | 11 | this->LoadPredict(std::make_shared<torchserve::LoadModelRequest>(
|
12 |
| - "test/resources/torchscript_model/mnist/mnist_handler", |
| 12 | + "test/resources/examples/mnist/mnist_handler", |
13 | 13 | "mnist_scripted_v2", -1, "", "", 1, false),
|
14 |
| - "test/resources/torchscript_model/mnist/base_handler", |
15 |
| - "test/resources/torchscript_model/mnist/0_png.pt", |
16 |
| - "mnist_ts", 200); |
| 14 | + "test/resources/examples/mnist/base_handler", |
| 15 | + "test/resources/examples/mnist/0_png.pt", "mnist_ts", 200); |
17 | 16 | }
|
18 | 17 |
|
19 | 18 | TEST_F(ModelPredictTest, TestLoadPredictMnistHandler) {
|
20 | 19 | this->LoadPredict(std::make_shared<torchserve::LoadModelRequest>(
|
21 |
| - "test/resources/torchscript_model/mnist/mnist_handler", |
| 20 | + "test/resources/examples/mnist/mnist_handler", |
22 | 21 | "mnist_scripted_v2", -1, "", "", 1, false),
|
23 |
| - "test/resources/torchscript_model/mnist/mnist_handler", |
24 |
| - "test/resources/torchscript_model/mnist/0_png.pt", |
25 |
| - "mnist_ts", 200); |
| 22 | + "test/resources/examples/mnist/mnist_handler", |
| 23 | + "test/resources/examples/mnist/0_png.pt", "mnist_ts", 200); |
26 | 24 | }
|
27 | 25 |
|
28 | 26 | TEST_F(ModelPredictTest, TestBackendInitWrongModelDir) {
|
29 |
| - auto result = backend_->Initialize("test/resources/torchscript_model/mnist"); |
| 27 | + auto result = backend_->Initialize("test/resources/examples/mnist"); |
30 | 28 | ASSERT_EQ(result, false);
|
31 | 29 | }
|
32 | 30 |
|
33 | 31 | TEST_F(ModelPredictTest, TestBackendInitWrongHandler) {
|
34 |
| - auto result = backend_->Initialize( |
35 |
| - "test/resources/torchscript_model/mnist/wrong_handler"); |
| 32 | + auto result = |
| 33 | + backend_->Initialize("test/resources/examples/mnist/wrong_handler"); |
36 | 34 | ASSERT_EQ(result, false);
|
37 | 35 | }
|
38 | 36 |
|
39 | 37 | TEST_F(ModelPredictTest, TestLoadModelFailure) {
|
40 |
| - backend_->Initialize("test/resources/torchscript_model/mnist/wrong_model"); |
| 38 | + backend_->Initialize("test/resources/examples/mnist/wrong_model"); |
41 | 39 | auto result =
|
42 | 40 | backend_->LoadModel(std::make_shared<torchserve::LoadModelRequest>(
|
43 |
| - "test/resources/torchscript_model/mnist/wrong_model", |
44 |
| - "mnist_scripted_v2", -1, "", "", 1, false)); |
| 41 | + "test/resources/examples/mnist/wrong_model", "mnist_scripted_v2", -1, |
| 42 | + "", "", 1, false)); |
45 | 43 | ASSERT_EQ(result->code, 500);
|
46 | 44 | }
|
47 | 45 |
|
48 | 46 | TEST_F(ModelPredictTest, TestLoadPredictMnistHandlerFailure) {
|
49 | 47 | this->LoadPredict(std::make_shared<torchserve::LoadModelRequest>(
|
50 |
| - "test/resources/torchscript_model/mnist/mnist_handler", |
| 48 | + "test/resources/examples/mnist/mnist_handler", |
51 | 49 | "mnist_scripted_v2", -1, "", "", 1, false),
|
52 |
| - "test/resources/torchscript_model/mnist/mnist_handler", |
53 |
| - "test/resources/torchscript_model/mnist/0.png", "mnist_ts", |
54 |
| - 500); |
| 50 | + "test/resources/examples/mnist/mnist_handler", |
| 51 | + "test/resources/examples/mnist/0.png", "mnist_ts", 500); |
55 | 52 | }
|
0 commit comments