Skip to content

Commit 87e1fec

Browse files
Fixed light gbm update (#7431)
* fixed light gbm update * fixed tensorflow test using LightGBM
1 parent 1ccbbd4 commit 87e1fec

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

eng/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<!-- Other product dependencies -->
3939
<ApacheArrowVersion>14.0.2</ApacheArrowVersion>
4040
<GoogleProtobufVersion>3.27.1</GoogleProtobufVersion>
41-
<LightGBMVersion>3.3.5</LightGBMVersion>
41+
<LightGBMVersion>4.6.0</LightGBMVersion>
4242
<MicrosoftBclHashCodeVersion>6.0.0</MicrosoftBclHashCodeVersion>
4343
<MicrosoftBclMemoryVersion>9.0.0</MicrosoftBclMemoryVersion>
4444
<MicrosoftCodeAnalysisAnalyzersVersion>3.3.4</MicrosoftCodeAnalysisAnalyzersVersion>

src/Microsoft.ML.LightGbm/WrappedLightGbmDataset.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public unsafe Dataset(double[][] sampleValuePerColumn,
6767
{
6868
// Create container. Examples will pushed in later.
6969
LightGbmInterfaceUtils.Check(WrappedLightGbmInterface.DatasetCreateFromSampledColumn(
70-
(IntPtr)ptrValues, (IntPtr)ptrIndices, numCol, sampleNonZeroCntPerColumn, numSampleRow, numTotalRow,
70+
(IntPtr)ptrValues, (IntPtr)ptrIndices, numCol, sampleNonZeroCntPerColumn, numSampleRow, numTotalRow, 0,
7171
param, out _handle));
7272
}
7373
}

src/Microsoft.ML.LightGbm/WrappedLightGbmInterface.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ public static extern int DatasetCreateFromSampledColumn(IntPtr sampleValuePerCol
8787
int numCol,
8888
int[] sampleNonZeroCntPerColumn,
8989
int numSampleRow,
90-
int numTotalRow,
90+
int numTotalLocalRow,
91+
int numTotalDistributedRow,
9192
[MarshalAs(UnmanagedType.LPStr)] string parameters,
9293
out SafeDataSetHandle ret);
9394

test/Microsoft.ML.TensorFlow.Tests/TensorflowTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ public void TensorFlowTransformMNISTConvTest()
675675
var metrics = _mlContext.MulticlassClassification.Evaluate(predicted);
676676

677677
Assert.Equal(0.99, metrics.MicroAccuracy, .01);
678-
Assert.Equal(0.93, metrics.MacroAccuracy, 0.01);
678+
Assert.Equal(0.99, metrics.MacroAccuracy, 0.01);
679679

680680
var oneSample = GetOneMNISTExample();
681681

@@ -900,7 +900,7 @@ public void TensorFlowTransformMNISTConvSavedModelTest()
900900

901901
// First group of checks
902902
Assert.Equal(0.99, metrics.MicroAccuracy, .01);
903-
Assert.Equal(.93, metrics.MacroAccuracy, 0.01);
903+
Assert.Equal(.99, metrics.MacroAccuracy, 0.01);
904904

905905
// An in-memory example. Its label is predicted below.
906906
var oneSample = GetOneMNISTExample();

0 commit comments

Comments
 (0)