diff --git a/test/Microsoft.ML.TestFramework/DataPipe/TestDataPipeBase.cs b/test/Microsoft.ML.TestFramework/DataPipe/TestDataPipeBase.cs index 304ac6751f..0ea86c9a87 100644 --- a/test/Microsoft.ML.TestFramework/DataPipe/TestDataPipeBase.cs +++ b/test/Microsoft.ML.TestFramework/DataPipe/TestDataPipeBase.cs @@ -1164,12 +1164,10 @@ private bool EqualWithEpsDouble(Double x, Double y) return FloatUtils.GetBits(x) == FloatUtils.GetBits(y) || CompareNumbersWithTolerance(x, y, null, 3); } - private const float SingleEps = 1e-6f; - - private static bool EqualWithEpsSingle(float x, float y) + private bool EqualWithEpsSingle(float x, float y) { // bitwise comparison is needed because Abs(Inf-Inf) and Abs(NaN-NaN) are not 0s. - return FloatUtils.GetBits(x) == FloatUtils.GetBits(y) || Math.Abs(x - y) < SingleEps; + return FloatUtils.GetBits(x) == FloatUtils.GetBits(y) || CompareNumbersWithTolerance(x, y, null, 3); } protected Func GetComparerOne(Row r1, Row r2, int col, Func fn) diff --git a/test/Microsoft.ML.Tests/Transformers/RffTests.cs b/test/Microsoft.ML.Tests/Transformers/RffTests.cs index f231082757..d647eddbca 100644 --- a/test/Microsoft.ML.Tests/Transformers/RffTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/RffTests.cs @@ -37,7 +37,7 @@ private class TestClassInvalidSchema public int A; } - [ConditionalFact(typeof(BaseTestBaseline), nameof(BaseTestBaseline.LessThanNetCore30OrNotNetCore))] // netcore3.0 output differs from Baseline + [Fact] public void RffWorkout() { Random rand = new Random();