[SPARK-59202][ML][TESTS] Enable save/load round-trip tests in Java ML tree suites - #58492
Open
uros-b wants to merge 1 commit into
Open
[SPARK-59202][ML][TESTS] Enable save/load round-trip tests in Java ML tree suites#58492uros-b wants to merge 1 commit into
uros-b wants to merge 1 commit into
Conversation
tdcmeehan
approved these changes
Sep 3, 2026
Member
Author
|
Thank you @tdcmeehan! Adding @HyukjinKwon & @zhengruifeng for ML |
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.
What changes were proposed in this pull request?
Six Java ML tree test suites --
JavaDecisionTreeClassifierSuite,JavaGBTClassifierSuite,JavaRandomForestClassifierSuite,JavaDecisionTreeRegressorSuite,JavaGBTRegressorSuite,JavaRandomForestRegressorSuite-- carried commented-out save/load round-trip tests with a// TODO: Add test once save/load are implemented. SPARK-6725marker.Save/load has long shipped (
MLWritable/MLReadable). This enables those tests. The commented code was obsolete -- it used the oldsave(SparkContext, path)/load(SparkContext, path)mllib API and referenced stale variable names (model2/model3) -- so each block is rewritten to the current API:Why are the changes needed?
The blocks were dead (obsolete API and wrong variable names) rather than merely disabled. Enabling them adds Java-facing save/load round-trip coverage for the tree models, matching what the Scala suites already provide via
DefaultReadWriteTest.Does this PR introduce any user-facing change?
No. Test-only.
How was this patch tested?
Ran the six enabled Java suites locally; all pass.
Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.8)