Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

xfail_when_nonstandard_decimal_separator for test_metric.py #18312

Merged
merged 1 commit into from
May 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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