Skip to content

Fixed light gbm update #7431

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<!-- Other product dependencies -->
<ApacheArrowVersion>14.0.2</ApacheArrowVersion>
<GoogleProtobufVersion>3.27.1</GoogleProtobufVersion>
<LightGBMVersion>3.3.5</LightGBMVersion>
<LightGBMVersion>4.6.0</LightGBMVersion>
<MicrosoftBclHashCodeVersion>6.0.0</MicrosoftBclHashCodeVersion>
<MicrosoftBclMemoryVersion>9.0.0</MicrosoftBclMemoryVersion>
<MicrosoftCodeAnalysisAnalyzersVersion>3.3.4</MicrosoftCodeAnalysisAnalyzersVersion>
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ML.LightGbm/WrappedLightGbmDataset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public unsafe Dataset(double[][] sampleValuePerColumn,
{
// Create container. Examples will pushed in later.
LightGbmInterfaceUtils.Check(WrappedLightGbmInterface.DatasetCreateFromSampledColumn(
(IntPtr)ptrValues, (IntPtr)ptrIndices, numCol, sampleNonZeroCntPerColumn, numSampleRow, numTotalRow,
(IntPtr)ptrValues, (IntPtr)ptrIndices, numCol, sampleNonZeroCntPerColumn, numSampleRow, numTotalRow, 0,
param, out _handle));
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/Microsoft.ML.LightGbm/WrappedLightGbmInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ public static extern int DatasetCreateFromSampledColumn(IntPtr sampleValuePerCol
int numCol,
int[] sampleNonZeroCntPerColumn,
int numSampleRow,
int numTotalRow,
int numTotalLocalRow,
int numTotalDistributedRow,
[MarshalAs(UnmanagedType.LPStr)] string parameters,
out SafeDataSetHandle ret);

Expand Down
4 changes: 2 additions & 2 deletions test/Microsoft.ML.TensorFlow.Tests/TensorflowTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ public void TensorFlowTransformMNISTConvTest()
var metrics = _mlContext.MulticlassClassification.Evaluate(predicted);

Assert.Equal(0.99, metrics.MicroAccuracy, .01);
Assert.Equal(0.93, metrics.MacroAccuracy, 0.01);
Assert.Equal(0.99, metrics.MacroAccuracy, 0.01);

var oneSample = GetOneMNISTExample();

Expand Down Expand Up @@ -900,7 +900,7 @@ public void TensorFlowTransformMNISTConvSavedModelTest()

// First group of checks
Assert.Equal(0.99, metrics.MicroAccuracy, .01);
Assert.Equal(.93, metrics.MacroAccuracy, 0.01);
Assert.Equal(.99, metrics.MacroAccuracy, 0.01);

// An in-memory example. Its label is predicted below.
var oneSample = GetOneMNISTExample();
Expand Down
Loading