File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -261,7 +261,7 @@ def test_run_cv_evaluation():
261
261
assert len (entity_results .test ['ner_crf' ]["F1-score" ]) == n_folds
262
262
263
263
264
- def test_report_output (tmpdir_factory ):
264
+ def test_evaluation_report (tmpdir_factory ):
265
265
266
266
path = tmpdir_factory .mktemp ("evaluation" ).strpath
267
267
report_filename = path + "report.json"
@@ -281,9 +281,19 @@ def test_report_output(tmpdir_factory):
281
281
282
282
report = json .loads (utils .read_file (report_filename ))
283
283
284
+ greet_results = {"precision" : 1.0 ,
285
+ "recall" : 1.0 ,
286
+ "f1-score" : 1.0 ,
287
+ "support" : 1 }
288
+
289
+ prediction = {'text' : 'hello' ,
290
+ 'intent' : 'greet' ,
291
+ 'predicted' : 'greet' ,
292
+ 'confidence' : 0.98765 }
293
+
284
294
assert len (report .keys ()) == 4
285
- assert report ["greet" ]
286
- assert result
295
+ assert report ["greet" ] == greet_results
296
+ assert result [ "predictions" ][ 0 ] == prediction
287
297
288
298
289
299
def test_empty_intent_removal ():
You can’t perform that action at this time.
0 commit comments