Skip to content

Commit 51da0cc

Browse files
author
Qian Chen
committed
test12
1 parent 9a3ef09 commit 51da0cc

File tree

5 files changed

+138
-1
lines changed

5 files changed

+138
-1
lines changed

test/integration/local/test_hosting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from utils import local_mode_utils
2222

2323
HOSTING_RESOURCE_PATH = os.path.join(RESOURCE_PATH, 'dummy_hosting')
24-
MODEL_PATH = os.path.join(HOSTING_RESOURCE_PATH, 'model.tar.gz')
24+
MODEL_PATH = os.path.join(HOSTING_RESOURCE_PATH, 'model')
2525
SCRIPT_PATH = os.path.join(HOSTING_RESOURCE_PATH, 'code', 'dummy_hosting_module.py')
2626

2727

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License").
4+
# You may not use this file except in compliance with the License.
5+
# A copy of the License is located at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# or in the "license" file accompanying this file. This file is distributed
10+
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
11+
# express or implied. See the License for the specific language governing
12+
# permissions and limitations under the License.
13+
14+
15+
class DummyModel(object):
16+
def predict(self, data):
17+
return data
18+
19+
20+
def model_fn(model_dir):
21+
return DummyModel()
22+
23+
24+
def transform_fn(model, data, input_content_type, output_content_type):
25+
return data, "application/json"
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"name": "data", "shape": [100, 1, 28, 28]}]
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
{
2+
"nodes": [
3+
{
4+
"op": "null",
5+
"name": "data",
6+
"inputs": []
7+
},
8+
{
9+
"op": "Flatten",
10+
"name": "flatten0",
11+
"inputs": [[0, 0, 0]]
12+
},
13+
{
14+
"op": "null",
15+
"name": "fullyconnected0_weight",
16+
"attrs": {"num_hidden": "128"},
17+
"inputs": []
18+
},
19+
{
20+
"op": "null",
21+
"name": "fullyconnected0_bias",
22+
"attrs": {"num_hidden": "128"},
23+
"inputs": []
24+
},
25+
{
26+
"op": "FullyConnected",
27+
"name": "fullyconnected0",
28+
"attrs": {"num_hidden": "128"},
29+
"inputs": [[1, 0, 0], [2, 0, 0], [3, 0, 0]]
30+
},
31+
{
32+
"op": "Activation",
33+
"name": "activation0",
34+
"attrs": {"act_type": "relu"},
35+
"inputs": [[4, 0, 0]]
36+
},
37+
{
38+
"op": "null",
39+
"name": "fullyconnected1_weight",
40+
"attrs": {"num_hidden": "64"},
41+
"inputs": []
42+
},
43+
{
44+
"op": "null",
45+
"name": "fullyconnected1_bias",
46+
"attrs": {"num_hidden": "64"},
47+
"inputs": []
48+
},
49+
{
50+
"op": "FullyConnected",
51+
"name": "fullyconnected1",
52+
"attrs": {"num_hidden": "64"},
53+
"inputs": [[5, 0, 0], [6, 0, 0], [7, 0, 0]]
54+
},
55+
{
56+
"op": "Activation",
57+
"name": "activation1",
58+
"attrs": {"act_type": "relu"},
59+
"inputs": [[8, 0, 0]]
60+
},
61+
{
62+
"op": "null",
63+
"name": "fullyconnected2_weight",
64+
"attrs": {"num_hidden": "10"},
65+
"inputs": []
66+
},
67+
{
68+
"op": "null",
69+
"name": "fullyconnected2_bias",
70+
"attrs": {"num_hidden": "10"},
71+
"inputs": []
72+
},
73+
{
74+
"op": "FullyConnected",
75+
"name": "fullyconnected2",
76+
"attrs": {"num_hidden": "10"},
77+
"inputs": [[9, 0, 0], [10, 0, 0], [11, 0, 0]]
78+
},
79+
{
80+
"op": "null",
81+
"name": "softmax_label",
82+
"inputs": []
83+
},
84+
{
85+
"op": "SoftmaxOutput",
86+
"name": "softmax",
87+
"inputs": [[12, 0, 0], [13, 0, 0]]
88+
}
89+
],
90+
"arg_nodes": [0, 2, 3, 6, 7, 10, 11, 13],
91+
"node_row_ptr": [
92+
0,
93+
1,
94+
2,
95+
3,
96+
4,
97+
5,
98+
6,
99+
7,
100+
8,
101+
9,
102+
10,
103+
11,
104+
12,
105+
13,
106+
14,
107+
15
108+
],
109+
"heads": [[14, 0, 0]],
110+
"attrs": {"mxnet_version": ["int", 10800]}
111+
}

0 commit comments

Comments
 (0)