Skip to content
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

Update spark dependency to spark 3.2 #7359

Closed
wants to merge 1 commit into from

Conversation

WeichenXu123
Copy link
Contributor

Current xgboost4j released version built with spark 3.0, but the binary jar is incompatible with spark 3.2
This PR update the spark dependency to be spark 3.2

@WeichenXu123
Copy link
Contributor Author

@CodingCat Could you take a look ? Thanks!

@codecov-commenter
Copy link

Codecov Report

Merging #7359 (9ac66c0) into master (a6bcd54) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #7359   +/-   ##
=======================================
  Coverage   83.71%   83.71%           
=======================================
  Files          13       13           
  Lines        3892     3892           
=======================================
  Hits         3258     3258           
  Misses        634      634           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6bcd54...9ac66c0. Read the comment docs.

@WeichenXu123
Copy link
Contributor Author

Gentle ping @CodingCat , Thanks!

@trivialfis
Copy link
Member

@wbo4958 Could you please help take a look?

@wbo4958
Copy link
Contributor

wbo4958 commented Oct 28, 2021

Ok, I will verify it. Thx @WeichenXu123

@wbo4958
Copy link
Contributor

wbo4958 commented Oct 28, 2021

I just verified it with xgboost1.5.0 release, which will throw exception running on spark 3.2.0 release.

The exception happened in saving a model

Exception in thread "main" java.lang.NoSuchMethodError: org.json4s.JsonDSL$.pair2Assoc(Lscala/Tuple2;Lscala/Function1;)Lorg/json4s/JsonDSL$JsonAssoc;
	at ml.dmlc.xgboost4j.scala.spark.params.DefaultXGBoostParamsWriter$.getMetadataToSave(DefaultXGBoostParamsWriter.scala:75)
	at ml.dmlc.xgboost4j.scala.spark.params.DefaultXGBoostParamsWriter$.saveMetadata(DefaultXGBoostParamsWriter.scala:51)
	at ml.dmlc.xgboost4j.scala.spark.XGBoostClassificationModel$XGBoostClassificationModelWriter.saveImpl(XGBoostClassifier.scala:522)
	at org.apache.spark.ml.util.MLWriter.save(ReadWrite.scala:168)
	at org.apache.spark.ml.util.MLWritable.save(ReadWrite.scala:287)
	at org.apache.spark.ml.util.MLWritable.save$(ReadWrite.scala:287)
	at ml.dmlc.xgboost4j.scala.spark.XGBoostClassificationModel.save(XGBoostClassifier.scala:214)
	at iris$.main(iris.scala:53)
	at iris.main(iris.scala)

But when I updated the spark dependency to 3.2.0 and then built xgboost, the xgboost can run well on spark 3.2.0 but it will fail on spark versioned before 3.2.0

So we need a way to be compatible all 3.0+ spark.

@trivialfis
Copy link
Member

Is that a binary compatibility issue?

@wbo4958
Copy link
Contributor

wbo4958 commented Oct 28, 2021

Hi @WeichenXu123, I submitted another PR for the json4s compatible issue. Please help to check it

#7376

@trivialfis trivialfis added this to 1.6 In Progress in 2.0 Roadmap Nov 12, 2021
@wbo4958
Copy link
Contributor

wbo4958 commented Nov 22, 2021

@trivialfis, looks like we can close this PR

@trivialfis
Copy link
Member

trivialfis commented Nov 22, 2021

Thank you both!

@trivialfis trivialfis closed this Nov 22, 2021
@trivialfis trivialfis moved this from 1.6 In Progress to 1.6 Done in 2.0 Roadmap Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants