diff --git a/test/Microsoft.ML.Tests/Microsoft.ML.Tests.csproj b/test/Microsoft.ML.Tests/Microsoft.ML.Tests.csproj
index 0e0414cf5c..cff0b66736 100644
--- a/test/Microsoft.ML.Tests/Microsoft.ML.Tests.csproj
+++ b/test/Microsoft.ML.Tests/Microsoft.ML.Tests.csproj
@@ -64,4 +64,8 @@
PreserveNewest
+
+
+
+
diff --git a/test/Microsoft.ML.Tests/Properties/AssemblyInfo.cs b/test/Microsoft.ML.Tests/Properties/AssemblyInfo.cs
deleted file mode 100644
index c8afa8dcba..0000000000
--- a/test/Microsoft.ML.Tests/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-// 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: [TEST_STABILITY] 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/ScenariosWithDirectInstantiation/TensorflowTests.cs b/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs
index 857e642be9..6a1b0cba6c 100644
--- a/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs
+++ b/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs
@@ -811,12 +811,13 @@ private void ExecuteTFTransformMNISTConvTrainingTest(bool shuffle, int? shuffleS
batchSize: 20))
.Append(mlContext.Transforms.Concatenate("Features", "Prediction"))
.AppendCacheCheckpoint(mlContext)
+ // Attention: Do not set NumberOfThreads here, left this to use default value to avoid test crash.
+ // Details can be found here: https://github.com/dotnet/machinelearning/pull/4918
.Append(mlContext.MulticlassClassification.Trainers.LightGbm(new Trainers.LightGbm.LightGbmMulticlassTrainer.Options()
{
LabelColumnName = "Label",
FeatureColumnName = "Features",
Seed = 1,
- NumberOfThreads = 1,
NumberOfIterations = 1
}));
diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/TreeEstimators.cs b/test/Microsoft.ML.Tests/TrainerEstimators/TreeEstimators.cs
index c119e33c99..e503133e91 100644
--- a/test/Microsoft.ML.Tests/TrainerEstimators/TreeEstimators.cs
+++ b/test/Microsoft.ML.Tests/TrainerEstimators/TreeEstimators.cs
@@ -52,10 +52,11 @@ public void LightGBMBinaryEstimator()
{
var (pipe, dataView) = GetBinaryClassificationPipeline();
+ // Attention: Do not set NumberOfThreads here, left this to use default value to avoid test crash.
+ // Details can be found here: https://github.com/dotnet/machinelearning/pull/4918
var trainer = ML.BinaryClassification.Trainers.LightGbm(new LightGbmBinaryTrainer.Options
{
NumberOfLeaves = 10,
- NumberOfThreads = 1,
MinimumExampleCountPerLeaf = 2,
UnbalancedSets = false, // default value
});
@@ -73,10 +74,11 @@ public void LightGBMBinaryEstimatorUnbalanced()
{
var (pipe, dataView) = GetBinaryClassificationPipeline();
+ // Attention: Do not set NumberOfThreads here, left this to use default value to avoid test crash.
+ // Details can be found here: https://github.com/dotnet/machinelearning/pull/4918
var trainer = ML.BinaryClassification.Trainers.LightGbm(new LightGbmBinaryTrainer.Options
{
NumberOfLeaves = 10,
- NumberOfThreads = 1,
MinimumExampleCountPerLeaf = 2,
UnbalancedSets = true,
});
@@ -98,10 +100,11 @@ public void LightGBMBinaryEstimatorCorrectSigmoid()
var (pipe, dataView) = GetBinaryClassificationPipeline();
var sigmoid = .789;
+ // Attention: Do not set NumberOfThreads here, left this to use default value to avoid test crash.
+ // Details can be found here: https://github.com/dotnet/machinelearning/pull/4918
var trainer = ML.BinaryClassification.Trainers.LightGbm(new LightGbmBinaryTrainer.Options
{
NumberOfLeaves = 10,
- NumberOfThreads = 1,
MinimumExampleCountPerLeaf = 2,
Sigmoid = sigmoid
});
@@ -218,9 +221,11 @@ public void FastTreeRegressorEstimator()
public void LightGBMRegressorEstimator()
{
var dataView = GetRegressionPipeline();
+
+ // Attention: Do not set NumberOfThreads here, left this to use default value to avoid test crash.
+ // Details can be found here: https://github.com/dotnet/machinelearning/pull/4918
var trainer = ML.Regression.Trainers.LightGbm(new LightGbmRegressionTrainer.Options
{
- NumberOfThreads = 1,
NormalizeFeatures = NormalizeOption.Warn,
L2CategoricalRegularization = 5,
});
@@ -930,8 +935,15 @@ public void FastTreeTweedieRegressorTestSummary()
public void LightGbmRegressorTestSummary()
{
var dataView = GetRegressionPipeline();
+
+ // Attention: Do not set NumberOfThreads here, left this to use default value to avoid test crash.
+ // Details can be found here: https://github.com/dotnet/machinelearning/pull/4918
var trainer = ML.Regression.Trainers.LightGbm(
- new LightGbmRegressionTrainer.Options { NumberOfIterations = 10, NumberOfThreads = 1, NumberOfLeaves = 5});
+ new LightGbmRegressionTrainer.Options
+ {
+ NumberOfIterations = 10,
+ NumberOfLeaves = 5
+ });
var transformer = trainer.Fit(dataView);
@@ -984,8 +996,16 @@ public void FastForestBinaryClassificationTestSummary()
public void LightGbmBinaryClassificationTestSummary()
{
var (pipeline, dataView) = GetOneHotBinaryClassificationPipeline();
+
+ // Attention: Do not set NumberOfThreads here, left this to use default value to avoid test crash.
+ // Details can be found here: https://github.com/dotnet/machinelearning/pull/4918
var trainer = pipeline.Append(ML.BinaryClassification.Trainers.LightGbm(
- new LightGbmBinaryTrainer.Options { NumberOfIterations = 10, NumberOfThreads = 1, NumberOfLeaves = 5, UseCategoricalSplit = true }));
+ new LightGbmBinaryTrainer.Options
+ {
+ NumberOfIterations = 10,
+ NumberOfLeaves = 5,
+ UseCategoricalSplit = true
+ }));
var transformer = trainer.Fit(dataView);