-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Compatibility with Spark 3.2 + Scala 2.13 #7399
Comments
@emartinezs44 Bad news, I tried to upgrade dllib to scala 2.13, but only one of dllib's dependency xgboost4j didn't support scala 2.13. dmlc/xgboost#6596 |
Maybe we can release an experimental dllib package for Spark 3.2+scala 3.13 without xgboost support |
I see, this kind of dependences are a problem(having in mind that Spark 3.2 was released a year and a half ago). By now, the only solution is to create a profile and exclude the dependence and the code in Scala referencing xgboost. I will try to create a branch in my fork with this config and see if it compiles or if there are another problems. |
I have a branch https://github.com/qiuxin2012/BigDL/tree/scala3, I'm working on the compatiability with scala 2.13 |
@emartinezs44 I'm blocking by a "ambiguous implicit values" error, could you help?
|
let me check it out |
Well, there is a problem related to the implicit evidences that the compiler creates. This is with Scala 2.13
It includes an implicit evidence for the ClassTag[T]. Here a simplified output of the 'log-implicits' scalac compiler for the same problem but much simpler:
These kind of conflicts were resolved in Scala 2.12 taking the evidence created in the constructor call and passing it directly to the function: For Scala 2.12:
SOLUTION: This solution is valid for Scala 2.12, and consists in declaring the implicit in the class definition:
and in the constructors that create the conflict like:
changing the constructor definition like:
This resolves the problems in DenseTensor definition, maybe there are other related to this ambiguity problem. Take a look and tell me if you can handle it or if you need me to work in your branch. |
Thanks for you help, I will try your solution later. All compile errors are all fixed now, and the unit tests is running. |
@emartinezs44 We have released a snapshot version with Spark 3.2 and Scala 2.13 to |
Wonderful!!!, I try as as soon as possible. Thank you very much! |
The changes of scala 2.13 support are merged to https://github.com/intel-analytics/BigDL/tree/scala-2.13 We still has some failures due to:
Please info us, if you has more requirements. |
It seems to work well. Some aspects related to implicit conversions, which is normal having in mind that the Scala 3 compiler is a new compiler. But it looks great, let me try more in other scenarios. |
Hi. xgboost4j now supports Scala 2.13. dmlc/xgboost#9099 Thank you! |
@qiuxin2012 @shane-huang Hi. xgboost4j now supports Scala 2.13. dmlc/xgboost#9099 Thank you! |
@s0t00524 No plan to support scala 2.13 |
@qiuxin2012 Thank you for your reply. So, do you have any plan to support Scala 3? |
@s0t00524 No plan to support Scala 3 now. |
You can create Scala 3 projects following the repo: https://github.com/emartinezs44/ts4s. There is a branch compiled for 2.13. See the examples that are created in Scala 3. |
@emartinezs44 Thank you for your information. I will check it. |
I would like to know if there are any plans to compile bigdl-dllib with Scala 2.13, and publish the artifact. Currently I´m working with Scala 3 in some research and I would like to present a paper for the next Scaladays using new lang features + some bigdl examples.
Thanks!
The text was updated successfully, but these errors were encountered: