diff --git a/src/Microsoft.ML.FastTree/TreeEnsemble/TreeEnsembleCombiner.cs b/src/Microsoft.ML.FastTree/TreeEnsemble/TreeEnsembleCombiner.cs index b938ee3f5b..93258ea7c7 100644 --- a/src/Microsoft.ML.FastTree/TreeEnsemble/TreeEnsembleCombiner.cs +++ b/src/Microsoft.ML.FastTree/TreeEnsemble/TreeEnsembleCombiner.cs @@ -65,9 +65,9 @@ IPredictor IModelCombiner.CombineModels(IEnumerable models) foreach (var t in tree.TrainedEnsemble.Trees) { var bytes = new byte[t.SizeInBytes()]; - int position = -1; + int position = 0; t.ToByteArray(bytes, ref position); - position = -1; + position = 0; var tNew = new InternalRegressionTree(bytes, ref position); if (paramA != 1) { diff --git a/test/Microsoft.ML.Predictor.Tests/TestPredictors.cs b/test/Microsoft.ML.Predictor.Tests/TestPredictors.cs index f7abc2fc1f..89ac4b6e2d 100644 --- a/test/Microsoft.ML.Predictor.Tests/TestPredictors.cs +++ b/test/Microsoft.ML.Predictor.Tests/TestPredictors.cs @@ -625,7 +625,7 @@ public void RankingLightGBMTest() Done(); } - [X64Fact("x86 fails. Associated GitHubIssue: https://github.com/dotnet/machinelearning/issues/1216")] + [Fact] public void TestTreeEnsembleCombiner() { var dataPath = GetDataPath("breast-cancer.txt"); @@ -646,7 +646,7 @@ public void TestTreeEnsembleCombiner() CombineAndTestTreeEnsembles(dataView, fastTrees); } - [X64Fact("x86 fails. Associated GitHubIssue: https://github.com/dotnet/machinelearning/issues/1216")] + [Fact] public void TestTreeEnsembleCombinerWithCategoricalSplits() { var dataPath = GetDataPath("adult.tiny.with-schema.txt"); @@ -755,7 +755,7 @@ private void CombineAndTestTreeEnsembles(IDataView idv, PredictorModel[] fastTre } } - [X64Fact("x86 fails. Associated GitHubIssue: https://github.com/dotnet/machinelearning/issues/1216")] + [Fact] public void TestEnsembleCombiner() { var dataPath = GetDataPath("breast-cancer.txt"); @@ -801,7 +801,7 @@ public void TestEnsembleCombiner() Done(); } - [X64Fact("x86 fails. Associated GitHubIssue: https://github.com/dotnet/machinelearning/issues/1216")] + [LightGBMFact] public void TestMulticlassEnsembleCombiner() { var dataPath = GetDataPath("breast-cancer.txt");