Skip to content

Commit

Permalink
xfail_when_nonstandard_decimal_separator for test_metric.py (apache#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
leezu authored and AntiZpvoh committed Jul 6, 2020
1 parent f548632 commit c36f3df
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/python/unittest/test_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def test_loss_update():
_, acc2 = metric2.get()
assert acc1 == acc2

@xfail_when_nonstandard_decimal_separator
def test_binary_f1():
microF1 = mx.gluon.metric.create("f1", average="micro")
macroF1 = mx.gluon.metric.F1(average="macro")
Expand Down Expand Up @@ -167,6 +168,7 @@ def test_multiclass_f1():
np.testing.assert_almost_equal(microF1.get()[1], fmicro)
np.testing.assert_almost_equal(macroF1.get()[1], fmacro)

@xfail_when_nonstandard_decimal_separator
def test_multilabel_f1():
microF1 = mx.gluon.metric.create("f1", class_type="multilabel", average="micro")
macroF1 = mx.gluon.metric.F1(class_type="multilabel", average="macro")
Expand Down Expand Up @@ -201,7 +203,8 @@ def test_multilabel_f1():
fmicro = 0.7272727272727272 #f1_score(overall_label, overall_pred, average="micro")
np.testing.assert_almost_equal(microF1.get()[1], fmicro)
np.testing.assert_almost_equal(macroF1.get()[1], fmacro)


@xfail_when_nonstandard_decimal_separator
def test_mcc():
microMCC = mx.gluon.metric.create("mcc")

Expand Down

0 comments on commit c36f3df

Please sign in to comment.