@@ -56,102 +56,99 @@ namespace {
5656using namespace ::viam::sdk;
5757using namespace ::viam::sdktests;
5858
59-
60-
61-
6259const struct MLModelService ::metadata test_metadata {
6360 // `name`
6461 " my model" ,
6562
66- // `type`
67- " magic" ,
63+ // `type`
64+ " magic" ,
6865
69- // `description`,
70- " Convolutional neural network ..." ,
66+ // `description`,
67+ " Convolutional neural network ..." ,
7168
72- // `inputs`
73- {{
69+ // `inputs`
70+ {{
7471
75- // `name`
76- " input1" ,
72+ // `name`
73+ " input1" ,
7774
78- // `description`
79- " the first input" ,
75+ // `description`
76+ " the first input" ,
8077
81- // `data_type`
82- MLModelService::tensor_info::data_types::k_float32,
78+ // `data_type`
79+ MLModelService::tensor_info::data_types::k_float32,
8380
84- // `shape`
85- {640 , 480 , -1 },
81+ // `shape`
82+ {640 , 480 , -1 },
8683
87- // `associated_files`
88- {{// `name`
89- " path/to/file1.1" ,
84+ // `associated_files`
85+ {{// `name`
86+ " path/to/file1.1" ,
9087
91- // `description`
92- " i1f1" ,
88+ // `description`
89+ " i1f1" ,
9390
94- // `label_type`
95- MLModelService::tensor_info::file::k_label_type_tensor_value},
96- {" path/to/file1.2" ,
97- " i1f2" ,
98- MLModelService::tensor_info::file::k_label_type_tensor_axis}},
91+ // `label_type`
92+ MLModelService::tensor_info::file::k_label_type_tensor_value},
93+ {" path/to/file1.2" ,
94+ " i1f2" ,
95+ MLModelService::tensor_info::file::k_label_type_tensor_axis}},
9996
100- // `extra`
101- ProtoStruct{{" foo" , ProtoValue{" bar" }}}},
97+ // `extra`
98+ ProtoStruct{{" foo" , ProtoValue{" bar" }}}},
10299
103- {" input2" ,
104- " the second input" ,
105- MLModelService::tensor_info::data_types::k_int32,
106- {4096 , 2160 , 3 , -1 },
107- {{" path/to/file2.1" , " i2f1" , MLModelService::tensor_info::file::k_label_type_tensor_axis},
108- {" path/to/file2.2" ,
109- " i2f2" ,
110- MLModelService::tensor_info::file::k_label_type_tensor_value}},
111- ProtoStruct{{" bar" , ProtoValue{false }}}}},
100+ {" input2" ,
101+ " the second input" ,
102+ MLModelService::tensor_info::data_types::k_int32,
103+ {4096 , 2160 , 3 , -1 },
104+ {{" path/to/file2.1" , " i2f1" , MLModelService::tensor_info::file::k_label_type_tensor_axis},
105+ {" path/to/file2.2" ,
106+ " i2f2" ,
107+ MLModelService::tensor_info::file::k_label_type_tensor_value}},
108+ ProtoStruct{{" bar" , ProtoValue{false }}}}},
112109
113- // `outputs`
114- {{
110+ // `outputs`
111+ {{
115112
116- // `name`
117- " output1" ,
113+ // `name`
114+ " output1" ,
118115
119- // `description`
120- " the first output" ,
116+ // `description`
117+ " the first output" ,
121118
122- // `data_type`
123- MLModelService::tensor_info::data_types::k_int32,
119+ // `data_type`
120+ MLModelService::tensor_info::data_types::k_int32,
124121
125- // `shape`
126- {-1 , -1 },
122+ // `shape`
123+ {-1 , -1 },
127124
128- // `associated_files`
129- {{// `name`
130- " path/to/output_file1.1" ,
125+ // `associated_files`
126+ {{// `name`
127+ " path/to/output_file1.1" ,
131128
132- // `description`
133- " o1f1" ,
129+ // `description`
130+ " o1f1" ,
134131
135- // `label_type`
136- MLModelService::tensor_info::file::k_label_type_tensor_axis},
137- {" path/to/output_file1.2" ,
138- " o1f2" ,
139- MLModelService::tensor_info::file::k_label_type_tensor_value}},
132+ // `label_type`
133+ MLModelService::tensor_info::file::k_label_type_tensor_axis},
134+ {" path/to/output_file1.2" ,
135+ " o1f2" ,
136+ MLModelService::tensor_info::file::k_label_type_tensor_value}},
140137
141- // `extra`
142- ProtoStruct{{" baz" , ProtoValue{}}}},
138+ // `extra`
139+ ProtoStruct{{" baz" , ProtoValue{}}}},
143140
144- {" output2" ,
145- " the second output" ,
146- MLModelService::tensor_info::data_types::k_float32,
147- {-1 , -1 , 4 },
148- {{" path/to/output_file2.1" ,
149- " o2f1" ,
150- MLModelService::tensor_info::file::k_label_type_tensor_axis},
151- {" path/to/output_file2.2" ,
152- " o2f2" ,
153- MLModelService::tensor_info::file::k_label_type_tensor_value}},
154- ProtoStruct{{" quux" , ProtoValue{3.14 }}}}},
141+ {" output2" ,
142+ " the second output" ,
143+ MLModelService::tensor_info::data_types::k_float32,
144+ {-1 , -1 , 4 },
145+ {{" path/to/output_file2.1" ,
146+ " o2f1" ,
147+ MLModelService::tensor_info::file::k_label_type_tensor_axis},
148+ {" path/to/output_file2.2" ,
149+ " o2f2" ,
150+ MLModelService::tensor_info::file::k_label_type_tensor_value}},
151+ ProtoStruct{{" quux" , ProtoValue{3.14 }}}}},
155152};
156153
157154BOOST_AUTO_TEST_SUITE (test_mock_mlmodel)
0 commit comments