Repository navigation
fix: upgrade native LightGBM to 4.7.0 - #2753
Draft
Rana Singh (ranadeepsingh) wants to merge 3 commits into
Draft
Rana Singh (ranadeepsingh) wants to merge 3 commits into
Rana Singh (ranadeepsingh) wants to merge 3 commits into
Conversation
Label: area/lightgbm ## Summary Target the upstream LightGBM 4.7.0 engine, prepare a verified local Maven package from its official platform artifacts, and add public-estimator regressions for the distributed categorical split crash and legacy models. Keep the native publication and runtime qualification requirements explicit. ## Prompting Intent The maintainer asked to investigate microsoft#2697 in a new worktree, chose upgrading to LightGBM 4.7.0 over a same-era backport, and approved native package preparation and local validation. The maintainer then requested a pull request and the SynapseML PR readiness loop. Native publication and release were not authorized and are not performed by this change. ## Linked Sources - Issue and contributor claim: microsoft#2697 (comment) - Prior Fabric comparison: microsoft#2697 (comment) - Original customer report: microsoft#2310 - Delivery tracker: microsoft#2699 - Upstream report: lightgbm-org/LightGBM#6974 - Upstream correction: lightgbm-org/LightGBM#6738 - Official release: https://github.com/lightgbm-org/LightGBM/releases/tag/v4.7.0 ## Rationale The exact published 3.3.510 package crashes in SplitInner when a distributed categorical split selects 30 categories at maxCatThreshold=32. The official 4.7.0 natives pass the same regression and retain the production JNI calls. Use matched official binaries instead of maintaining a private native patch. Keep the Linux Java 8 wrappers because the macOS artifact's wrappers require Java 21; verify declarations across platforms and preserve all native bytes. Retain the CUDA guard, public SynapseML signatures and serialized parameters. The 4.7.0 Maven coordinate is not yet public. Keep this work draft until an authorized publisher completes publication, exact-artifact CI passes, and the remaining platform, Fabric, port and performance checks are complete. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Label: area/lightgbm ## Summary Normalize the packaging script to UTF-8 LF text before hashing it. Add a regression proving LF and CRLF checkouts produce identical Maven artifacts. ## Prompting Intent The maintainer requested a pull request and the SynapseML readiness loop for the LightGBM 4.7.0 upgrade. Preparing the commit exposed a reproducibility defect that needed correction before the package could be handed to a publisher. ## Linked Sources - Upgrade request and contributor claim: microsoft#2697 (comment) - Package inputs: https://github.com/lightgbm-org/LightGBM/releases/tag/v4.7.0 ## Rationale Git normalizes text line endings, so hashing raw checkout bytes made the embedded provenance and complete JAR differ without any source-code change. Hash normalized text while retaining the exact native binary checksums. The new test fails with the previous implementation and passes after the fix. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Label: area/lightgbm ## Summary Move the native-package tests into the existing CIHelpers test directory and update their source lookup and documented commands. No pipeline changes. ## Prompting Intent The maintainer requested a pull request and the SynapseML readiness loop. The new packaging regressions must run in normal CI, not only when invoked manually during the upgrade investigation. ## Linked Sources - Upgrade investigation: microsoft#2697 - Existing CIHelpers selector: https://github.com/microsoft/SynapseML/blob/861c3a1e14a9511b5604563ff1e3976cefa82e90/pipeline.yaml#L125 ## Rationale CIHelpers selects tools/ci/tests, so tests under tools/lightgbm/tests would not be exercised. Reuse that discovery path rather than modifying protected pipeline YAML or adding a second test runner. All 14 relocated tests pass on Windows and Linux; the tests only use synthetic local artifacts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Collaborator
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Hey Rana Singh (@ranadeepsingh) 👋! We use semantic commit messages to streamline the release process. Examples of commit messages with semantic prefixes:
To test your commit locally, please follow our guild on building from source. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues/PRs
Related to #2697 and delivery tracker #2699.
The contributor's reproduction and proposed upgrade route
informed this change. It consumes the upstream correction in
lightgbm-org/LightGBM#6738 through the official 4.7.0 release.
This does not close the delivery issue or attribute every report in
#2310 to this defect. The separate streaming/OpenMP fix in
#2751 remains independent; it overlaps the LightGBM overview
and parameter file, so either PR must be rebased and revalidated if the other
lands first.
What changes are proposed in this pull request?
Upgrade SynapseML's native LightGBM dependency from
3.3.510to4.7.0toaddress the reproduced distributed categorical-training crash.
Draft, blocked on native publication. The proposed
com.microsoft.ml.lightgbm:lightgbmlib:4.7.0coordinate is not yet on MavenCentral. Standard CI cannot resolve it until an authorized publisher completes
publication. This PR does not publish artifacts, add a CI cache fallback, or
claim that an existing Fabric runtime already contains the fix.
Linux, macOS and Windows 4.7.0 JARs. Preserve all six native binaries and
record their source/asset provenance and license.
classes, so verify matching Java/JNI declarations and use the Linux wrappers
instead. Native macOS qualification remains required.
dense/sparse bulk and streaming paths, repeat fitting, persistence,
classifier probabilities, and old native models/reference datasets.
SynapseML JVM signatures or serialized parameter shapes.
The packaging script hash normalizes LF/CRLF checkout differences. Its unit
tests run in the existing
CIHelpersjob, without changing pipeline YAML.How is this patch tested?
Current-target validation uses JDK 11, Scala 2.12.17 and Spark 3.5.0 through
.github/skills/synapseml-local-setup/scripts/synapseml-sbt.sh --repo "$PWD" --.The candidate resolver is added only to the SBT session:
The second setting avoids duplicating the classpath on the nearly full local
drive; it does not change the generated code or repository configuration.
sbt lightgbm/compile lightgbm/Test/compilesbt lightgbm/scalastyle lightgbm/Test/scalastylesbt "lightgbm/testOnly com.microsoft.azure.synapse.ml.lightgbm.split1.LightGBMNativeCompatibilitySuite com.microsoft.azure.synapse.ml.lightgbm.split1.GroupIdManagerSuite com.microsoft.azure.synapse.ml.lightgbm.split1.LightGBMIpv6NetworkE2ESuite"sbt "lightgbm/testOnly com.microsoft.azure.synapse.ml.lightgbm.split1.VerifyLightGBMCommon -- -z device -z CUDA -z GPU"sbt "lightgbm/testOnly com.microsoft.azure.synapse.ml.lightgbm.split1.LightGBMValidationDataSuite"sbt lightgbm/codegenpython -m pytest tools/ci/tests/test_prepare_native_package.py -q -p no:cacheproviderpython3 -B -m pytest tools/ci/tests/ -q -p no:cacheproviderpython3 -m black --check tools/lightgbm tools/ci/tests/test_prepare_native_package.pyThe Scala run started at
68b185daaeagainst target861c3a1e14. The finalcommit,
4691a1e6e3, only relocates the Python packaging tests into CI andupdates their README commands. Scala sources and the native candidate are
unchanged. The full CI helper selection above ran after that final commit.
The exported classpath shows SBT reused the earlier local
repository-finalJAR, SHA-256
ef2ae1cd2a2c26474a824c96ef5b6dd776dbe70dee3aed920065f2d4de35b9f3.The final prepared JAR is
425352bdb4614d9c45b909b7edd54199e911fe7074acab8c8c9899a92b7a9efc.Every Java class and all six native binaries match byte-for-byte. The package
provenance changed after normalizing the script hash. These results validate
the same runtime binaries, but do not establish fresh resolution of the final
JAR.
The combined SBT command exited 1 at codegen. Its launcher and shutdown hooks
reported
java.io.IOException: Input/output errorwhile reading JARs; thehost drive had about 6 MB free. This does not invalidate the completed test
results, but the current-target codegen gate remains open.
Remote CI on head
4691a1e6e3confirms the publication blocker:Compile & Style Check
failed in
lightgbm / updatewithunresolved dependency: com.microsoft.ml.lightgbm#lightgbmlib;4.7.0: not found.Both Maven Central endpoints were tried. This is a dependency-delivery failure
caused by the proposed pin, not a flaky test. Azure build
239250018
also failed in
lightgbm / updatefor the same missing dependency duringPrewarm sbt bootstrap cache. The bootstrap command exhausted seven attemptsto resolve the unpublished package. The build used
refs/pull/2753/merge, merge SHA2bce4d7c289b5d49842ce563f06150efdbe1a2b7, withreason=pullRequest.The
Test CI helpersjob passed all 282 tests and 63 subtests, including thenew package checks. The Spark test jobs did not run; Azure published no test
runs for this build. Copilot review was requested, but no current-head automated
review arrived within the bounded wait or by the final audit. Review remains
incomplete.
The exact checked-in distributed dense regression crashes with the published
3.3.510binaries at iteration zero inSerialTreeLearner::SplitInner+0xf7b.It passes with the 4.7.0 binaries. The test checks two actual active native
workers and a first split selecting 30 of 101 categories at
maxCatThreshold=32, rather than relying only on configured task counts.Additional bounded local evidence: identical package bytes from Windows and
Linux, old native/Spark model prediction parity, reuse of old serialized
references, and Windows x86-64 JNI training/prediction. Native hashes were
checked. These local processes do not replace multi-executor Fabric evidence.
The earlier Fabric A/B in the issue used a same-era reconstruction, not this
official 4.7.0 package.
Still required before merge/release:
repository metadata, followed by empty-cache dependency resolution.
against the published artifact.
continued-training coverage and representative before/after performance.
Does this PR change any dependencies?
com.microsoft.ml.lightgbm:lightgbmlibchanges from3.3.510to4.7.0.Resolution is verified against the isolated prepared Maven repository only,
not Maven Central. The official upstream source commit is
8f7036f03627054d5a54a6f965b13f4b9ff2cb63.Does this PR add a new feature? If so, have you added samples on website?
website/docs/documentationfolder.Make sure you choose the correct class
estimators/transformersand namespace.DocTablepoints to correct API link.npm startto make sure the website renders correctly.<!--pytest-codeblocks:cont-->before each python code blocks to enable auto-tests for python samples.WebsiteSamplesTestsjob pass in the pipeline.