Skip to content

Commit 95e506f

Browse files
committed
update assertions in some tests
1 parent 18d035d commit 95e506f

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

tests/modules/scoring/test_gcn_scorer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def test_gcn_scorer_multilabel(multilabel_dataset):
5454
test_utterances = ["test 1", "test 2"]
5555
predictions = scorer.predict(test_utterances)
5656

57-
expected_predictions = np.array([[0.481326, 0.480452, 0.487172], [0.481336, 0.480337, 0.487094]])
57+
expected_predictions = np.array([[0.5005291, 0.50055695, 0.50052416], [0.5005291, 0.50055695, 0.50052416]])
5858
np.testing.assert_allclose(predictions, expected_predictions, atol=1e-2)
5959

6060

@@ -69,7 +69,7 @@ def test_gcn_scorer_multiclass(multiclass_dataset):
6969
test_utterances = ["test 1", "test 2"]
7070
predictions = scorer.predict(test_utterances)
7171

72-
expected_predictions = np.array([[0.345223, 0.322953, 0.331824], [0.345442, 0.322777, 0.331781]])
72+
expected_predictions = np.array([[0.33322755, 0.33331314, 0.33345938], [0.33322755, 0.33331314, 0.33345938]])
7373
np.testing.assert_allclose(predictions, expected_predictions, atol=1e-2)
7474
np.testing.assert_allclose(predictions.sum(axis=1), 1.0, atol=1e-6)
7575

tests/modules/scoring/test_linear.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ def test_base_linear(dataset):
2424
np.testing.assert_almost_equal(
2525
np.array(
2626
[
27-
[0.05998958, 0.74930755, 0.07045561, 0.12024726],
28-
[0.06299568, 0.60657246, 0.11424723, 0.21618463],
29-
[0.1285409, 0.53515583, 0.14137456, 0.19492871],
30-
[0.09999432, 0.3907234, 0.12208764, 0.38719464],
31-
[0.04322527, 0.85661047, 0.03667959, 0.06348467],
27+
[4.42261625e-03, 9.80002146e-01, 5.84225268e-03, 9.73298532e-03],
28+
[3.48457612e-02, 8.67882177e-01, 5.26664920e-02, 4.46055700e-02],
29+
[6.60129036e-02, 6.81724763e-01, 6.13724992e-02, 1.90889834e-01],
30+
[3.19191741e-01, 3.05030337e-01, 1.57439488e-01, 2.18338434e-01],
31+
[1.25137105e-04, 9.99343901e-01, 2.06237249e-04, 3.24724282e-04],
3232
]
3333
),
3434
predictions,

tests/modules/scoring/test_sklearn.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ def test_base_sklearn(dataset):
3131
np.testing.assert_almost_equal(
3232
np.array(
3333
[
34-
[0.222, 0.287, 0.219, 0.271],
35-
[0.222, 0.287, 0.219, 0.271],
36-
[0.222, 0.287, 0.219, 0.271],
37-
[0.222, 0.287, 0.219, 0.271],
38-
[0.222, 0.287, 0.219, 0.271],
34+
[0.19808616, 0.33850935, 0.20807189, 0.25533256],
35+
[0.21305655, 0.28760493, 0.22420657, 0.275132],
36+
[0.21481034, 0.2826606, 0.22563915, 0.27688998],
37+
[0.21779545, 0.27305433, 0.22861205, 0.2805381],
38+
[0.18922822, 0.3680897, 0.19876744, 0.2439147],
3939
]
4040
),
4141
predictions,

0 commit comments

Comments
 (0)