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

diverging implicit expansion on squaredDistance #810

Open
pan3793 opened this issue May 4, 2021 · 1 comment
Open

diverging implicit expansion on squaredDistance #810

pan3793 opened this issue May 4, 2021 · 1 comment

Comments

@pan3793
Copy link

pan3793 commented May 4, 2021

Hi,

I'm trying to bump breeze from 1.0 to 1.2 in Apache Spark, but got such compile exceptions. And I noticed that breeze migrated to new codegen framework recently, is it relative?

[error] /Users/chengpan/Projects/apache-spark/mllib/src/test/scala/org/apache/spark/mllib/util/MLUtilsSuite.scala:60:46: diverging implicit expansion for type breeze.linalg.squaredDistance.Impl2[breeze.linalg.Vector[Double],breeze.linalg.Vector[Double],VR]
[error] starting with method castOps in trait VectorOps
[error]       val squaredDist = breezeSquaredDistance(v1.asBreeze, v2.asBreeze)
[error]                                              ^
[error] /Users/chengpan/Projects/apache-spark/mllib/src/test/scala/org/apache/spark/mllib/util/MLUtilsSuite.scala:66:47: diverging implicit expansion for type breeze.linalg.squaredDistance.Impl2[breeze.linalg.Vector[Double],breeze.linalg.Vector[Double],VR]
[error] starting with method castOps in trait VectorOps
[error]       val squaredDist2 = breezeSquaredDistance(v2.asBreeze, v3.asBreeze)
[error]                                               ^
[error] /Users/chengpan/Projects/apache-spark/mllib/src/test/scala/org/apache/spark/mllib/util/MLUtilsSuite.scala:74:48: diverging implicit expansion for type breeze.linalg.squaredDistance.Impl2[breeze.linalg.Vector[Double],breeze.linalg.Vector[Double],VR]
[error] starting with method castOps in trait VectorOps
[error]         val squaredDist = breezeSquaredDistance(v2.asBreeze, v4.asBreeze)
[error]                                                ^
[error] four errors found
[warn] In the last 9 seconds, 5.224 (60.3%) were spent in GC. [Heap: 2.85GB free of 3.80GB, max 3.80GB] Consider increasing the JVM heap using `-Xmx` or try a different collector, e.g. `-XX:+UseG1GC`, for better performance.
[error] (mllib / Test / compileIncremental) Compilation failed
[error] Total time: 341 s (05:41), completed 2021-5-4 20:10:48

The compile failed code is here https://github.com/pan3793/spark/blob/SPARK-35310/mllib/src/test/scala/org/apache/spark/mllib/util/MLUtilsSuite.scala

And to reproduce the issue, run build/mvn clean compile -DskipTests or build/sbt compile test:compile.

@dlwh
Copy link
Member

dlwh commented May 4, 2021 via email

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

No branches or pull requests

2 participants