@@ -183,24 +183,27 @@ def radio_pairs():
183183 return [
184184 NameSpace (predictions = [get_radio ("is_animal" , answer_name = "yes" )],
185185 ground_truths = [get_radio ("is_animal" , answer_name = "yes" )],
186- expected = {'is_animal ' : [1 , 0 , 0 , 0 ]}),
186+ expected = {'yes ' : [1 , 0 , 0 , 0 ]}),
187187 NameSpace (predictions = [get_radio ("is_animal" , answer_name = "yes" )],
188188 ground_truths = [get_radio ("is_animal" , answer_name = "no" )],
189- expected = {'is_animal' : [0 , 1 , 0 , 1 ]}),
189+ expected = {
190+ 'no' : [0 , 0 , 0 , 1 ],
191+ 'yes' : [0 , 1 , 0 , 0 ]
192+ }),
190193 NameSpace (predictions = [get_radio ("is_animal" , answer_name = "yes" )],
191194 ground_truths = [],
192- expected = {'is_animal ' : [0 , 1 , 0 , 0 ]}),
195+ expected = {'yes ' : [0 , 1 , 0 , 0 ]}),
193196 NameSpace (predictions = [],
194197 ground_truths = [get_radio ("is_animal" , answer_name = "yes" )],
195- expected = {'is_animal ' : [0 , 0 , 0 , 1 ]}),
198+ expected = {'yes ' : [0 , 0 , 0 , 1 ]}),
196199 NameSpace (predictions = [
197200 get_radio ("is_animal" , answer_name = "yes" ),
198201 get_radio ("is_short" , answer_name = "no" )
199202 ],
200203 ground_truths = [get_radio ("is_animal" , answer_name = "yes" )],
201204 expected = {
202- 'is_animal ' : [1 , 0 , 0 , 0 ],
203- 'is_short ' : [0 , 1 , 0 , 0 ]
205+ 'no ' : [0 , 1 , 0 , 0 ],
206+ 'yes ' : [1 , 0 , 0 , 0 ]
204207 }),
205208 #Not supported yet:
206209 # NameSpace(
@@ -221,18 +224,18 @@ def checklist_pairs():
221224 get_checklist ("animal_attributes" ,
222225 answer_names = ["striped" ])
223226 ],
224- expected = {'animal_attributes ' : [1 , 0 , 0 , 0 ]}),
227+ expected = {'striped ' : [1 , 0 , 0 , 0 ]}),
225228 NameSpace (predictions = [
226229 get_checklist ("animal_attributes" , answer_names = ["striped" ])
227230 ],
228231 ground_truths = [],
229- expected = {'animal_attributes ' : [0 , 1 , 0 , 0 ]}),
232+ expected = {'striped ' : [0 , 1 , 0 , 0 ]}),
230233 NameSpace (predictions = [],
231234 ground_truths = [
232235 get_checklist ("animal_attributes" ,
233236 answer_names = ["striped" ])
234237 ],
235- expected = {'animal_attributes ' : [0 , 0 , 0 , 1 ]}),
238+ expected = {'striped ' : [0 , 0 , 0 , 1 ]}),
236239 NameSpace (predictions = [
237240 get_checklist ("animal_attributes" ,
238241 answer_names = ["striped" , "short" ])
@@ -241,15 +244,21 @@ def checklist_pairs():
241244 get_checklist ("animal_attributes" ,
242245 answer_names = ["striped" ])
243246 ],
244- expected = {'animal_attributes' : [1 , 1 , 0 , 0 ]}),
247+ expected = {
248+ 'short' : [0 , 1 , 0 , 0 ],
249+ 'striped' : [1 , 0 , 0 , 0 ]
250+ }),
245251 NameSpace (predictions = [
246252 get_checklist ("animal_attributes" , answer_names = ["striped" ])
247253 ],
248254 ground_truths = [
249255 get_checklist ("animal_attributes" ,
250256 answer_names = ["striped" , "short" ])
251257 ],
252- expected = {'animal_attributes' : [1 , 0 , 0 , 1 ]}),
258+ expected = {
259+ 'short' : [0 , 0 , 0 , 1 ],
260+ 'striped' : [1 , 0 , 0 , 0 ]
261+ }),
253262 NameSpace (predictions = [
254263 get_checklist ("animal_attributes" ,
255264 answer_names = ["striped" , "short" , "black" ])
@@ -258,7 +267,11 @@ def checklist_pairs():
258267 get_checklist ("animal_attributes" ,
259268 answer_names = ["striped" , "short" ])
260269 ],
261- expected = {'animal_attributes' : [2 , 1 , 0 , 0 ]}),
270+ expected = {
271+ 'black' : [0 , 1 , 0 , 0 ],
272+ 'short' : [1 , 0 , 0 , 0 ],
273+ 'striped' : [1 , 0 , 0 , 0 ]
274+ }),
262275 NameSpace (predictions = [
263276 get_checklist ("animal_attributes" ,
264277 answer_names = ["striped" , "short" , "black" ]),
@@ -270,8 +283,11 @@ def checklist_pairs():
270283 get_checklist ("animal_name" , answer_names = ["pup" ])
271284 ],
272285 expected = {
273- 'animal_attributes' : [2 , 1 , 0 , 0 ],
274- 'animal_name' : [1 , 1 , 0 , 0 ]
286+ 'black' : [0 , 1 , 0 , 0 ],
287+ 'doggy' : [0 , 1 , 0 , 0 ],
288+ 'pup' : [1 , 0 , 0 , 0 ],
289+ 'short' : [1 , 0 , 0 , 0 ],
290+ 'striped' : [1 , 0 , 0 , 0 ]
275291 })
276292
277293 #Not supported yet:
0 commit comments