From aa477a9c67cc59131947709d6a0a574e87b3ebf8 Mon Sep 17 00:00:00 2001 From: frank-dong-ms <55860649+frank-dong-ms@users.noreply.github.com> Date: Wed, 26 Feb 2020 14:59:42 -0800 Subject: [PATCH 1/2] disable test parallelization for ML.Test assembly to avoid crash --- test/Microsoft.ML.Tests/DatabaseLoaderTests.cs | 2 -- test/Microsoft.ML.Tests/FeatureContributionTests.cs | 2 -- test/Microsoft.ML.Tests/OnnxConversionTest.cs | 2 -- test/Microsoft.ML.Tests/Properties/AssemblyInfo.cs | 9 +++++++++ .../Api/CookbookSamples/CookbookSamplesDynamicApi.cs | 2 -- .../TrainerEstimators/TrainerEstimators.cs | 2 -- .../TrainerEstimators/TreeEstimators.cs | 4 ---- test/Microsoft.ML.Tests/Transformers/NormalizerTests.cs | 2 -- 8 files changed, 9 insertions(+), 16 deletions(-) create mode 100644 test/Microsoft.ML.Tests/Properties/AssemblyInfo.cs diff --git a/test/Microsoft.ML.Tests/DatabaseLoaderTests.cs b/test/Microsoft.ML.Tests/DatabaseLoaderTests.cs index 924b4190e5..9595d35af1 100644 --- a/test/Microsoft.ML.Tests/DatabaseLoaderTests.cs +++ b/test/Microsoft.ML.Tests/DatabaseLoaderTests.cs @@ -170,8 +170,6 @@ public void IrisVectorLightGbm() } [LightGBMFact] - //Skipping test temporarily. This test will be re-enabled once the cause of failures has been determined - [Trait("Category", "SkipInCI")] public void IrisVectorLightGbmWithLoadColumnName() { if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) diff --git a/test/Microsoft.ML.Tests/FeatureContributionTests.cs b/test/Microsoft.ML.Tests/FeatureContributionTests.cs index eb88d767d9..fa5132d2ce 100644 --- a/test/Microsoft.ML.Tests/FeatureContributionTests.cs +++ b/test/Microsoft.ML.Tests/FeatureContributionTests.cs @@ -91,8 +91,6 @@ public void TestPoissonRegression() } [Fact] - //Skipping test temporarily. This test will be re-enabled once the cause of failures has been determined - [Trait("Category", "SkipInCI")] public void TestGAMRegression() { TestFeatureContribution(ML.Regression.Trainers.Gam(), GetSparseDataset(numberOfInstances: 100), "GAMRegression"); diff --git a/test/Microsoft.ML.Tests/OnnxConversionTest.cs b/test/Microsoft.ML.Tests/OnnxConversionTest.cs index 195f8d4634..c6488e9509 100644 --- a/test/Microsoft.ML.Tests/OnnxConversionTest.cs +++ b/test/Microsoft.ML.Tests/OnnxConversionTest.cs @@ -339,8 +339,6 @@ public void TestVectorWhiteningOnnxConversionTest() } [Fact] - //Skipping test temporarily. This test will be re-enabled once the cause of failures has been determined - [Trait("Category", "SkipInCI")] public void PlattCalibratorOnnxConversionTest() { var mlContext = new MLContext(seed: 1); diff --git a/test/Microsoft.ML.Tests/Properties/AssemblyInfo.cs b/test/Microsoft.ML.Tests/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..d6e544480c --- /dev/null +++ b/test/Microsoft.ML.Tests/Properties/AssemblyInfo.cs @@ -0,0 +1,9 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Xunit; + +// TODO: disable test parallelization for this assembly as running test in parallel sometimes cause test host process to crash +[assembly: CollectionBehavior(DisableTestParallelization = true)] + diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamplesDynamicApi.cs b/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamplesDynamicApi.cs index 70299beb83..c189489d56 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamplesDynamicApi.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamplesDynamicApi.cs @@ -365,8 +365,6 @@ public void GlobalFeatureImportance() } [Fact] - //Skipping test temporarily. This test will be re-enabled once the cause of failures has been determined - [Trait("Category", "SkipInCI")] public void GetLinearModelWeights() { var dataPath = GetDataPath("housing.txt"); diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/TrainerEstimators.cs b/test/Microsoft.ML.Tests/TrainerEstimators/TrainerEstimators.cs index 88616da267..5feb5eca2e 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/TrainerEstimators.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/TrainerEstimators.cs @@ -87,8 +87,6 @@ public void KMeansEstimator() /// HogwildSGD TrainerEstimator test (logistic regression). /// [Fact] - //Skipping test temporarily. This test will be re-enabled once the cause of failures has been determined - [Trait("Category", "SkipInCI")] public void TestEstimatorHogwildSGD() { var trainers = new[] { ML.BinaryClassification.Trainers.SgdCalibrated(l2Regularization: 0, numberOfIterations: 80), diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/TreeEstimators.cs b/test/Microsoft.ML.Tests/TrainerEstimators/TreeEstimators.cs index c5e30b2a6d..c119e33c99 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/TreeEstimators.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/TreeEstimators.cs @@ -69,8 +69,6 @@ public void LightGBMBinaryEstimator() } [LightGBMFact] - //Skipping test temporarily. This test will be re-enabled once the cause of failures has been determined - [Trait("Category", "SkipInCI")] public void LightGBMBinaryEstimatorUnbalanced() { var (pipe, dataView) = GetBinaryClassificationPipeline(); @@ -95,8 +93,6 @@ public void LightGBMBinaryEstimatorUnbalanced() /// LightGBMBinaryTrainer CorrectSigmoid test /// [LightGBMFact] - //Skipping test temporarily. This test will be re-enabled once the cause of failures has been determined - [Trait("Category", "SkipInCI")] public void LightGBMBinaryEstimatorCorrectSigmoid() { var (pipe, dataView) = GetBinaryClassificationPipeline(); diff --git a/test/Microsoft.ML.Tests/Transformers/NormalizerTests.cs b/test/Microsoft.ML.Tests/Transformers/NormalizerTests.cs index 445ce64d20..f13a525705 100644 --- a/test/Microsoft.ML.Tests/Transformers/NormalizerTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/NormalizerTests.cs @@ -751,8 +751,6 @@ public void GcnWorkout() } [Fact] - //Skipping test temporarily. This test will be re-enabled once the cause of failures has been determined - [Trait("Category", "SkipInCI")] public void TestGcnNormCommandLine() { Assert.Equal(Maml.Main(new[] { @"showschema loader=Text{col=A:R4:0-10} xf=GcnTransform{col=B:A} in=f:\2.txt" }), (int)0); From e28884017a544b4fe0f7d2e4043d2c25265db2a9 Mon Sep 17 00:00:00 2001 From: frank-dong-ms <55860649+frank-dong-ms@users.noreply.github.com> Date: Thu, 27 Feb 2020 13:27:26 -0800 Subject: [PATCH 2/2] refine comments --- test/Microsoft.ML.Tests/Properties/AssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Microsoft.ML.Tests/Properties/AssemblyInfo.cs b/test/Microsoft.ML.Tests/Properties/AssemblyInfo.cs index d6e544480c..c8afa8dcba 100644 --- a/test/Microsoft.ML.Tests/Properties/AssemblyInfo.cs +++ b/test/Microsoft.ML.Tests/Properties/AssemblyInfo.cs @@ -4,6 +4,6 @@ using Xunit; -// TODO: disable test parallelization for this assembly as running test in parallel sometimes cause test host process to crash +// TODO: [TEST_STABILITY] disable test parallelization for this assembly as running test in parallel sometimes cause test host process to crash [assembly: CollectionBehavior(DisableTestParallelization = true)]